Documentation ¶
Index ¶
- Variables
- type AnonymousIdentityProvider
- type BiometricIdentityProvider
- type LDAPIdentityProvider
- type LoginIDIdentityProvider
- type OAuthIdentityProvider
- type PasskeyIdentityProvider
- type SIWEIdentityProvider
- type Service
- func (s *Service) AdminAPIGetByLoginIDKeyAndLoginIDValue(ctx context.Context, loginIDKey string, loginIDValue string) (*identity.Info, error)
- func (s *Service) AdminAPIGetByOAuthAliasAndSubject(ctx context.Context, alias string, subjectID string) (*identity.Info, error)
- func (s *Service) CheckDuplicated(ctx context.Context, info *identity.Info) (dupeIdentity *identity.Info, err error)
- func (s *Service) CheckDuplicatedByUniqueKey(ctx context.Context, info *identity.Info) (dupeIdentity *identity.Info, err error)
- func (s *Service) Count(ctx context.Context, userID string) (uint64, error)
- func (s *Service) Create(ctx context.Context, info *identity.Info) error
- func (s *Service) Delete(ctx context.Context, info *identity.Info) error
- func (s *Service) Get(ctx context.Context, id string) (*identity.Info, error)
- func (s *Service) GetMany(ctx context.Context, ids []string) ([]*identity.Info, error)
- func (s *Service) ListByClaim(ctx context.Context, name string, value string) ([]*identity.Info, error)
- func (s *Service) ListByUser(ctx context.Context, userID string) ([]*identity.Info, error)
- func (s *Service) ListByUserIDs(ctx context.Context, userIDs []string) (map[string][]*identity.Info, error)
- func (s *Service) ListCandidates(ctx context.Context, userID string) (out []identity.Candidate, err error)
- func (s *Service) ListIdentitiesThatHaveStandardAttributes(ctx context.Context, userID string) ([]*identity.Info, error)
- func (s *Service) ListRefsByUsers(ctx context.Context, userIDs []string, identityType *model.IdentityType) ([]*model.IdentityRef, error)
- func (s *Service) New(ctx context.Context, userID string, spec *identity.Spec, ...) (*identity.Info, error)
- func (s *Service) Normalize(ctx context.Context, typ model.LoginIDKeyType, value string) (normalized string, uniqueKey string, err error)
- func (s *Service) SearchBySpec(ctx context.Context, spec *identity.Spec) (exactMatch *identity.Info, otherMatches []*identity.Info, err error)
- func (s *Service) Update(ctx context.Context, info *identity.Info) error
- func (s *Service) UpdateWithSpec(ctx context.Context, info *identity.Info, spec *identity.Spec, ...) (*identity.Info, error)
- type Store
- func (s *Store) Count(ctx context.Context, userID string) (uint64, error)
- func (s *Store) GetRefByID(ctx context.Context, id string) (*model.IdentityRef, error)
- func (s *Store) ListRefsByIDs(ctx context.Context, ids []string) ([]*model.IdentityRef, error)
- func (s *Store) ListRefsByUsers(ctx context.Context, userIDs []string, identityType *model.IdentityType) ([]*model.IdentityRef, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AnonymousIdentityProvider ¶
type AnonymousIdentityProvider interface { New(userID string, keyID string, key []byte) *identity.Anonymous Get(ctx context.Context, userID, id string) (*identity.Anonymous, error) GetMany(ctx context.Context, ids []string) ([]*identity.Anonymous, error) GetByKeyID(ctx context.Context, keyID string) (*identity.Anonymous, error) List(ctx context.Context, userID string) ([]*identity.Anonymous, error) Create(ctx context.Context, i *identity.Anonymous) error Delete(ctx context.Context, i *identity.Anonymous) error }
type BiometricIdentityProvider ¶
type BiometricIdentityProvider interface { New(userID string, keyID string, key []byte, deviceInfo map[string]interface{}) *identity.Biometric Get(ctx context.Context, userID, id string) (*identity.Biometric, error) GetMany(ctx context.Context, ids []string) ([]*identity.Biometric, error) GetByKeyID(ctx context.Context, keyID string) (*identity.Biometric, error) List(ctx context.Context, userID string) ([]*identity.Biometric, error) Create(ctx context.Context, i *identity.Biometric) error Delete(ctx context.Context, i *identity.Biometric) error }
type LDAPIdentityProvider ¶
type LDAPIdentityProvider interface { New( userID string, serverName string, loginUserName *string, userIDAttributeName string, userIDAttributeValue []byte, claims map[string]interface{}, rawEntryJSON map[string]interface{}, ) *identity.LDAP WithUpdate(iden *identity.LDAP, loginUserName *string, claims map[string]interface{}, rawEntryJSON map[string]interface{}) *identity.LDAP Get(ctx context.Context, userID, id string) (*identity.LDAP, error) GetMany(ctx context.Context, ids []string) ([]*identity.LDAP, error) List(ctx context.Context, userID string) ([]*identity.LDAP, error) GetByServerUserID(ctx context.Context, serverName string, userIDAttributeName string, userIDAttributeValue []byte) (*identity.LDAP, error) ListByClaim(ctx context.Context, name string, value string) ([]*identity.LDAP, error) Create(ctx context.Context, i *identity.LDAP) error Update(ctx context.Context, i *identity.LDAP) error Delete(ctx context.Context, i *identity.LDAP) error }
type LoginIDIdentityProvider ¶
type LoginIDIdentityProvider interface { New(userID string, loginID identity.LoginIDSpec, options loginid.CheckerOptions) (*identity.LoginID, error) WithValue(iden *identity.LoginID, value string, options loginid.CheckerOptions) (*identity.LoginID, error) Normalize(typ model.LoginIDKeyType, value string) (normalized string, uniqueKey string, err error) Get(ctx context.Context, userID, id string) (*identity.LoginID, error) GetMany(ctx context.Context, ids []string) ([]*identity.LoginID, error) List(ctx context.Context, userID string) ([]*identity.LoginID, error) GetByValue(ctx context.Context, loginIDValue string) ([]*identity.LoginID, error) GetByKeyAndValue(ctx context.Context, loginIDKey string, loginIDValue string) (*identity.LoginID, error) GetByUniqueKey(ctx context.Context, uniqueKey string) (*identity.LoginID, error) ListByClaim(ctx context.Context, name string, value string) ([]*identity.LoginID, error) Create(ctx context.Context, i *identity.LoginID) error Update(ctx context.Context, i *identity.LoginID) error Delete(ctx context.Context, i *identity.LoginID) error }
type OAuthIdentityProvider ¶
type OAuthIdentityProvider interface { New( userID string, providerID oauthrelyingparty.ProviderID, subjectID string, profile map[string]interface{}, claims map[string]interface{}, ) *identity.OAuth WithUpdate(iden *identity.OAuth, rawProfile map[string]interface{}, claims map[string]interface{}) *identity.OAuth Get(ctx context.Context, userID, id string) (*identity.OAuth, error) GetMany(ctx context.Context, ids []string) ([]*identity.OAuth, error) List(ctx context.Context, userID string) ([]*identity.OAuth, error) GetByProviderSubject(ctx context.Context, providerID oauthrelyingparty.ProviderID, subjectID string) (*identity.OAuth, error) GetByUserProvider(ctx context.Context, userID string, providerID oauthrelyingparty.ProviderID) (*identity.OAuth, error) ListByClaim(ctx context.Context, name string, value string) ([]*identity.OAuth, error) Create(ctx context.Context, i *identity.OAuth) error Update(ctx context.Context, i *identity.OAuth) error Delete(ctx context.Context, i *identity.OAuth) error }
type PasskeyIdentityProvider ¶
type PasskeyIdentityProvider interface { New(ctx context.Context, userID string, attestationResponse []byte) (*identity.Passkey, error) Get(ctx context.Context, userID, id string) (*identity.Passkey, error) GetMany(ctx context.Context, ids []string) ([]*identity.Passkey, error) GetBySpec(ctx context.Context, spec *identity.PasskeySpec) (*identity.Passkey, error) List(ctx context.Context, userID string) ([]*identity.Passkey, error) Create(ctx context.Context, i *identity.Passkey) error Delete(ctx context.Context, i *identity.Passkey) error }
type SIWEIdentityProvider ¶
type SIWEIdentityProvider interface { New(ctx context.Context, userID string, msg string, signature string) (*identity.SIWE, error) Get(ctx context.Context, userID, id string) (*identity.SIWE, error) GetMany(ctx context.Context, ids []string) ([]*identity.SIWE, error) GetByMessage(ctx context.Context, msg string, signature string) (*identity.SIWE, error) List(ctx context.Context, userID string) ([]*identity.SIWE, error) Create(ctx context.Context, i *identity.SIWE) error Delete(ctx context.Context, i *identity.SIWE) error }
type Service ¶
type Service struct { Authentication *config.AuthenticationConfig Identity *config.IdentityConfig IdentityFeatureConfig *config.IdentityFeatureConfig Store *Store LoginID LoginIDIdentityProvider OAuth OAuthIdentityProvider Anonymous AnonymousIdentityProvider Biometric BiometricIdentityProvider Passkey PasskeyIdentityProvider SIWE SIWEIdentityProvider LDAP LDAPIdentityProvider }
func (*Service) AdminAPIGetByLoginIDKeyAndLoginIDValue ¶
func (*Service) AdminAPIGetByOAuthAliasAndSubject ¶
func (*Service) CheckDuplicated ¶
func (*Service) CheckDuplicatedByUniqueKey ¶
func (*Service) ListByClaim ¶
func (*Service) ListByUser ¶
func (*Service) ListByUserIDs ¶
func (s *Service) ListByUserIDs(ctx context.Context, userIDs []string) (map[string][]*identity.Info, error)
nolint:gocognit This method is actually simple
func (*Service) ListCandidates ¶
func (*Service) ListIdentitiesThatHaveStandardAttributes ¶
func (*Service) ListRefsByUsers ¶
func (s *Service) ListRefsByUsers(ctx context.Context, userIDs []string, identityType *model.IdentityType) ([]*model.IdentityRef, error)
type Store ¶
type Store struct { SQLBuilder *appdb.SQLBuilderApp SQLExecutor *appdb.SQLExecutor }
func (*Store) GetRefByID ¶
func (*Store) ListRefsByIDs ¶
func (*Store) ListRefsByUsers ¶
func (s *Store) ListRefsByUsers(ctx context.Context, userIDs []string, identityType *model.IdentityType) ([]*model.IdentityRef, error)
Click to show internal directories.
Click to hide internal directories.