Versions in this module Expand all Collapse all v1 v1.4.0 Aug 15, 2026 v1.3.0 Jul 22, 2026 v1.2.0 Jun 28, 2026 v1.1.2 Jun 28, 2026 Changes in this version + const CreatedAt + const OAuthClientStateTimeout + const OAuthServerClientTypeConfidential + const OAuthServerClientTypePublic + const Phone + const ScopeEmail + const ScopeOpenID + const ScopePhone + const ScopeProfile + const SessionLowAAL + const SessionPastNotAfter + const SessionPastTimebox + const SessionTimedOut + const SessionValid + const TOTP + const TokenEndpointAuthMethodClientSecretBasic + const TokenEndpointAuthMethodClientSecretPost + const TokenEndpointAuthMethodNone + const Web3Grant + const Web3Provider + const WebAuthn + const WebAuthnChallengeTypeAuthentication + const WebAuthnChallengeTypeRegistration + const WebAuthnChallengeTypeSignup + var ActionLogTypeMap = map[AuditAction]auditLogType + var SupportedOAuthScopes = []string + func AddClaimToSession(tx *storage.Connection, sessionId uuid.UUID, ...) error + func CleanupExpiredOAuthServerAuthorizations(tx *storage.Connection) error + func ClearAllOneTimeTokensForUser(tx *storage.Connection, userID uuid.UUID) error + func ClearOneTimeTokenForUser(tx *storage.Connection, userID uuid.UUID, tokenType OneTimeTokenType) error + func CompareAAL(a, b AuthenticatorAssuranceLevel) int + func CountCustomOAuthProviders(tx *storage.Connection) (int, error) + func CountOtherUsers(tx *storage.Connection, id uuid.UUID) (int, error) + func CountWebAuthnCredentialsByUserID(conn *storage.Connection, userID uuid.UUID) (int, error) + func CreateCustomOAuthProvider(tx *storage.Connection, provider *CustomOAuthProvider) error + func CreateOAuthServerAuthorization(tx *storage.Connection, auth *OAuthServerAuthorization) error + func CreateOAuthServerClient(tx *storage.Connection, client *OAuthServerClient) error + func CreateOneTimeToken(tx *storage.Connection, userID uuid.UUID, relatesTo, tokenHash string, ...) error + func DeleteCustomOAuthProvider(tx *storage.Connection, id uuid.UUID) error + func DeleteExpiredFactors(tx *storage.Connection, validityDuration time.Duration) error + func DeleteFactorsByUserId(tx *storage.Connection, userId uuid.UUID) error + func DeleteUnverifiedFactors(tx *storage.Connection, user *User, factorType string) error + func DeleteWebAuthnCredentialsByUserID(tx *storage.Connection, userID uuid.UUID) error + func FindProvidersByUser(tx *storage.Connection, user *User) ([]string, error) + func FindUserWithRefreshToken(tx *storage.Connection, dbEncryption conf.DatabaseEncryptionConfiguration, ...) (*User, any, *Session, error) + func GetAccountLinkingDomain(provider string, ownLinkingDomains []string) string + func HasAllScopes(grantedScopes, requestedScopes []string) bool + func HasScope(scopes []string, scope string) bool + func InvalidateSessionsWithAALLessThan(tx *storage.Connection, userID uuid.UUID, level string) error + func IsDuplicatedPhone(tx *storage.Connection, phone, aud string) (bool, error) + func IsNotFoundError(err error) bool + func IsSupportedScope(scope string) bool + func IsUniqueConstraintViolatedError(err error) bool + func Logout(tx *storage.Connection, userId uuid.UUID) error + func LogoutAllExceptMe(tx *storage.Connection, sessionId uuid.UUID, userID uuid.UUID) error + func LogoutSession(tx *storage.Connection, sessionId uuid.UUID) error + func NewAuditLogEntry(config conf.AuditLogConfiguration, r *http.Request, tx *storage.Connection, ...) error + func ParseScopeString(scopeString string) []string + func RevokeOAuthServerConsentsByClient(tx *storage.Connection, clientID uuid.UUID) error + func RevokeOAuthServerConsentsByUser(tx *storage.Connection, userID uuid.UUID) error + func RevokeOAuthSessions(tx *storage.Connection, userID uuid.UUID, oauthClientID uuid.UUID) error + func RevokeTokenFamily(tx *storage.Connection, token *RefreshToken) error + func TruncateAll(conn *storage.Connection) error + func UpdateCustomOAuthProvider(tx *storage.Connection, provider *CustomOAuthProvider) error + func UpdateOAuthServerClient(tx *storage.Connection, client *OAuthServerClient) error + func UpsertOAuthServerConsent(tx *storage.Connection, consent *OAuthServerConsent) error + type AMRClaim struct + AuthenticationMethod *string + CreatedAt time.Time + ID uuid.UUID + SessionID uuid.UUID + UpdatedAt time.Time + func (AMRClaim) TableName() string + func (a *AMRClaim) GetAuthenticationMethod() string + func (cl *AMRClaim) IsAAL2Claim() bool + type AMREntry struct + Method string + Provider string + Timestamp int64 + type AccountLinkingDecision = int + const AccountExists + const CreateAccount + const LinkAccount + const MultipleAccounts + type AccountLinkingResult struct + CandidateEmail provider.Email + Decision AccountLinkingDecision + Identities []*Identity + LinkingDomain string + User *User + func DetermineAccountLinking(tx *storage.Connection, config *conf.GlobalConfiguration, ...) (AccountLinkingResult, error) + type AuditAction string + const CreateChallengeAction + const DeleteFactorAction + const DeleteRecoveryCodesAction + const EnrollFactorAction + const GenerateRecoveryCodesAction + const IdentityUnlinkAction + const InviteAcceptedAction + const LoginAction + const LogoutAction + const MFACodeLoginAction + const PasskeyCreatedAction + const PasskeyDeletedAction + const PasskeyUpdatedAction + const TokenRefreshedAction + const TokenRevokedAction + const UnenrollFactorAction + const UpdateFactorAction + const UserConfirmationRequestedAction + const UserDeletedAction + const UserInvitedAction + const UserModifiedAction + const UserReauthenticateAction + const UserRecoveryRequestedAction + const UserRepeatedSignUpAction + const UserSignedUpAction + const UserUpdatePasswordAction + const VerifyFactorAction + type AuditLogEntry struct + CreatedAt time.Time + DONTUSEINSTANCEID uuid.UUID + ID uuid.UUID + IPAddress string + Payload JSONMap + func FindAuditLogEntries(tx *storage.Connection, filterColumns []string, filterValue string, ...) ([]*AuditLogEntry, error) + func (AuditLogEntry) TableName() string + type AuthenticationMethod int + const Anonymous + const EmailChange + const EmailSignup + const Invite + const MFAPhone + const MFAWebAuthn + const MagicLink + const OAuth + const OAuthProviderAuthorizationCode + const OTP + const PasskeyLogin + const PasswordGrant + const Recovery + const SSOSAML + const TOTPSignIn + const TokenRefresh + const Web3 + func ParseAuthenticationMethod(authMethod string) (AuthenticationMethod, error) + func (authMethod AuthenticationMethod) String() string + type AuthenticatorAssuranceLevel int + const AAL1 + const AAL2 + const AAL3 + func ParseAAL(value *string) AuthenticatorAssuranceLevel + func (aal AuthenticatorAssuranceLevel) PointerString() *string + func (aal AuthenticatorAssuranceLevel) String() string + type Challenge struct + CreatedAt time.Time + Factor *Factor + FactorID uuid.UUID + ID uuid.UUID + IPAddress string + OtpCode string + VerifiedAt *time.Time + WebAuthnSessionData *WebAuthnSessionData + func (Challenge) TableName() string + func (c *Challenge) GetExpiryTime(expiryDuration float64) time.Time + func (c *Challenge) GetOtpCode(decryptionKeys map[string]string, encrypt bool, encryptionKeyID string) (string, bool, error) + func (c *Challenge) HasExpired(expiryDuration float64) bool + func (c *Challenge) SetOtpCode(otpCode string, encrypt bool, encryptionKeyID, encryptionKey string) error + func (c *Challenge) Verify(tx *storage.Connection) error + type ChallengeNotFoundError struct + func (e ChallengeNotFoundError) Error() string + func (e ChallengeNotFoundError) Is(target error) bool + type Cleaner interface + Clean func(*storage.Connection) (int, error) + type Cleanup struct + func NewCleanup(config *conf.GlobalConfiguration) *Cleanup + func (c *Cleanup) Clean(db *storage.Connection) (int, error) + type CodeChallengeMethod int + const Plain + const SHA256 + func ParseCodeChallengeMethod(codeChallengeMethod string) (CodeChallengeMethod, error) + func (codeChallengeMethod CodeChallengeMethod) String() string + type ConfirmationOrRecoveryTokenNotFoundError struct + func (e ConfirmationOrRecoveryTokenNotFoundError) Error() string + func (e ConfirmationOrRecoveryTokenNotFoundError) Is(target error) bool + type ConfirmationTokenNotFoundError struct + func (e ConfirmationTokenNotFoundError) Error() string + func (e ConfirmationTokenNotFoundError) Is(target error) bool + type CustomOAuthProvider struct + AcceptableClientIDs slices.String + AttributeMapping slices.Map + AuthorizationParams slices.Map + AuthorizationURL *string + CachedDiscovery *OIDCDiscovery + ClientID string + ClientSecret string + CreatedAt time.Time + DiscoveryCachedAt *time.Time + DiscoveryURL *string + EmailOptional bool + Enabled bool + ID uuid.UUID + Identifier string + Issuer *string + JwksURI *string + Name string + PKCEEnabled bool + ProviderType ProviderType + Scopes slices.String + SkipNonceCheck bool + TokenURL *string + UpdatedAt time.Time + UserinfoURL *string + func FindAllCustomOAuthProviders(tx *storage.Connection) ([]*CustomOAuthProvider, error) + func FindAllCustomOAuthProvidersByType(tx *storage.Connection, providerType ProviderType) ([]*CustomOAuthProvider, error) + func FindCustomOAuthProviderByID(tx *storage.Connection, id uuid.UUID) (*CustomOAuthProvider, error) + func FindCustomOAuthProviderByIdentifier(tx *storage.Connection, identifier string) (*CustomOAuthProvider, error) + func (p *CustomOAuthProvider) ClearDiscoveryCache() + func (p *CustomOAuthProvider) GetClientSecret(dbEncryption conf.DatabaseEncryptionConfiguration) (string, error) + func (p *CustomOAuthProvider) GetDiscoveryURL() string + func (p *CustomOAuthProvider) GetProviderName() string + func (p *CustomOAuthProvider) IsOAuth2() bool + func (p *CustomOAuthProvider) IsOIDC() bool + func (p *CustomOAuthProvider) SetClientSecret(secret string, dbEncryption conf.DatabaseEncryptionConfiguration) error + func (p *CustomOAuthProvider) SetDiscoveryCache(discovery *OIDCDiscovery) + func (p CustomOAuthProvider) TableName() string + type CustomOAuthProviderNotFoundError struct + func (e CustomOAuthProviderNotFoundError) Error() string + func (e CustomOAuthProviderNotFoundError) Is(target error) bool + type Factor struct + Challenge []Challenge + CreatedAt time.Time + FactorType string + FriendlyName string + ID uuid.UUID + LastChallengedAt *time.Time + LastWebAuthnChallengeData *LastWebAuthnChallengeData + Phone storage.NullString + Secret string + Status string + UpdatedAt time.Time + User User + UserID uuid.UUID + WebAuthnAAGUID *uuid.UUID + WebAuthnCredential *MFAWebAuthnCredential + func FindFactorByFactorID(conn *storage.Connection, factorID uuid.UUID) (*Factor, error) + func NewFactor(user *User, friendlyName string, factorType string, state FactorState) *Factor + func NewPhoneFactor(user *User, phone, friendlyName string) *Factor + func NewTOTPFactor(user *User, friendlyName string) *Factor + func NewWebAuthnFactor(user *User, friendlyName string) *Factor + func (Factor) TableName() string + func (f *Factor) CreateChallenge(ipAddress string) *Challenge + func (f *Factor) CreatePhoneChallenge(ipAddress string, otpCode string, encrypt bool, ...) (*Challenge, error) + func (f *Factor) DowngradeSessionsToAAL1(tx *storage.Connection) error + func (f *Factor) FindChallengeByID(conn *storage.Connection, challengeID uuid.UUID) (*Challenge, error) + func (f *Factor) FindLatestUnexpiredChallenge(tx *storage.Connection, expiryDuration float64) (*Challenge, error) + func (f *Factor) GetSecret(decryptionKeys map[string]string, encrypt bool, encryptionKeyID string) (string, bool, error) + func (f *Factor) IsPhoneFactor() bool + func (f *Factor) IsUnverified() bool + func (f *Factor) IsVerified() bool + func (f *Factor) SaveWebAuthnCredential(tx *storage.Connection, credential *webauthn.Credential) error + func (f *Factor) SetSecret(secret string, encrypt bool, encryptionKeyID, encryptionKey string) error + func (f *Factor) UpdateFriendlyName(tx *storage.Connection, friendlyName string) error + func (f *Factor) UpdateLastWebAuthnChallenge(tx *storage.Connection, challenge *Challenge, challengeType string, ...) error + func (f *Factor) UpdatePhone(tx *storage.Connection, phone string) error + func (f *Factor) UpdateStatus(tx *storage.Connection, state FactorState) error + func (f *Factor) WriteChallengeToDatabase(tx *storage.Connection, challenge *Challenge) error + type FactorNotFoundError struct + func (e FactorNotFoundError) Error() string + func (e FactorNotFoundError) Is(target error) bool + type FactorState int + const FactorStateUnverified + const FactorStateVerified + func (factorState FactorState) String() string + type FlowState struct + AuthCode *string + AuthCodeIssuedAt *time.Time + AuthenticationMethod string + CodeChallenge *string + CodeChallengeMethod *string + CreatedAt time.Time + EmailOptional bool + ID uuid.UUID + InviteToken *string + LinkingTargetID *uuid.UUID + OAuthClientStateID *uuid.UUID + ProviderAccessToken string + ProviderRefreshToken string + ProviderType string + Referrer *string + UpdatedAt time.Time + UserID *uuid.UUID + func FindFlowStateByAuthCode(tx *storage.Connection, authCode string) (*FlowState, error) + func FindFlowStateByID(tx *storage.Connection, id string) (*FlowState, error) + func FindFlowStateByUserID(tx *storage.Connection, id string, authenticationMethod AuthenticationMethod) (*FlowState, error) + func NewFlowState(params FlowStateParams) (*FlowState, error) + func (FlowState) TableName() string + func (f *FlowState) IsExpired(expiryDuration time.Duration) bool + func (f *FlowState) IsPKCE() bool + func (f *FlowState) RecordAuthCodeIssuedAtTime(tx *storage.Connection) error + func (f *FlowState) VerifyPKCE(codeVerifier string) error + type FlowStateNotFoundError struct + func (e FlowStateNotFoundError) Error() string + func (e FlowStateNotFoundError) Is(target error) bool + type FlowStateParams struct + AuthenticationMethod AuthenticationMethod + CodeChallenge string + CodeChallengeMethod string + EmailOptional bool + InviteToken string + LinkingTargetID *uuid.UUID + OAuthClientStateID *uuid.UUID + ProviderType string + Referrer string + UserID *uuid.UUID + type FlowType int + const ImplicitFlow + const PKCEFlow + func (flowType FlowType) String() string + type GrantParams struct + FactorID *uuid.UUID + IP string + OAuthClientID *uuid.UUID + Scopes *string + SessionNotAfter *time.Time + SessionTag *string + UserAgent string + func (g *GrantParams) FillGrantParams(r *http.Request) + type Identity struct + CreatedAt time.Time + Email storage.NullString + ID uuid.UUID + IdentityData JSONMap + LastSignInAt *time.Time + Provider string + ProviderID string + UpdatedAt time.Time + UserID uuid.UUID + func FindIdentitiesByUserID(tx *storage.Connection, userID uuid.UUID) ([]*Identity, error) + func FindIdentityByIdAndProvider(tx *storage.Connection, providerId, provider string) (*Identity, error) + func NewIdentity(user *User, provider string, identityData map[string]interface{}) (*Identity, error) + func (Identity) TableName() string + func (i *Identity) BeforeCreate(tx *pop.Connection) error + func (i *Identity) BeforeUpdate(tx *pop.Connection) error + func (i *Identity) GetEmail() string + func (i *Identity) IsForSSOProvider() bool + func (i *Identity) UpdateIdentityData(tx *storage.Connection, updates map[string]interface{}) error + type IdentityNotFoundError struct + func (e IdentityNotFoundError) Error() string + func (e IdentityNotFoundError) Is(target error) bool + type InvalidRedirectURIError struct + URI string + func (e InvalidRedirectURIError) Error() string + type JSONMap map[string]interface + func (j JSONMap) Scan(src interface{}) error + func (j JSONMap) Value() (driver.Value, error) + type LastWebAuthnChallengeData struct + Challenge Challenge + CredentialResponse json.RawMessage + Type string + func (lwcd *LastWebAuthnChallengeData) Scan(value interface{}) error + func (lwcd *LastWebAuthnChallengeData) Value() (driver.Value, error) + type MFAWebAuthnCredential struct + func (wc *MFAWebAuthnCredential) Scan(value interface{}) error + func (wc *MFAWebAuthnCredential) Value() (driver.Value, error) + type NewOAuthServerAuthorizationParams struct + ClientID uuid.UUID + CodeChallenge string + CodeChallengeMethod string + Nonce string + RedirectURI string + Resource string + Scope string + State string + TTL time.Duration + type OAuthClientState struct + CodeVerifier *string + CreatedAt time.Time + ID uuid.UUID + ProviderType string + func FindAndDeleteOAuthClientStateByID(tx *storage.Connection, id uuid.UUID) (*OAuthClientState, error) + func NewOAuthClientState(providerType string, codeVerifier *string) *OAuthClientState + func (OAuthClientState) TableName() string + func (s *OAuthClientState) IsExpired() bool + type OAuthClientStateNotFoundError struct + func (e OAuthClientStateNotFoundError) Error() string + func (e OAuthClientStateNotFoundError) Is(target error) bool + type OAuthServerAuthorization struct + ApprovedAt *time.Time + AuthorizationCode *string + AuthorizationID string + Client *OAuthServerClient + ClientID uuid.UUID + CodeChallenge *string + CodeChallengeMethod *string + CreatedAt time.Time + ExpiresAt time.Time + ID uuid.UUID + Nonce *string + RedirectURI string + Resource *string + ResponseType OAuthServerResponseType + Scope string + State *string + Status OAuthServerAuthorizationStatus + UserID *uuid.UUID + func FindOAuthServerAuthorizationByCode(tx *storage.Connection, code string) (*OAuthServerAuthorization, error) + func FindOAuthServerAuthorizationByID(tx *storage.Connection, authorizationID string) (*OAuthServerAuthorization, error) + func NewOAuthServerAuthorization(params NewOAuthServerAuthorizationParams) *OAuthServerAuthorization + func (OAuthServerAuthorization) TableName() string + func (auth *OAuthServerAuthorization) Approve(tx *storage.Connection) error + func (auth *OAuthServerAuthorization) Deny(tx *storage.Connection) error + func (auth *OAuthServerAuthorization) GenerateAuthorizationCode() string + func (auth *OAuthServerAuthorization) GetScopeList() []string + func (auth *OAuthServerAuthorization) IsExpired() bool + func (auth *OAuthServerAuthorization) MarkExpired(tx *storage.Connection) error + func (auth *OAuthServerAuthorization) SetUser(tx *storage.Connection, userID uuid.UUID) error + func (auth *OAuthServerAuthorization) Validate() error + func (auth *OAuthServerAuthorization) VerifyPKCE(codeVerifier string) error + type OAuthServerAuthorizationNotFoundError struct + func (e OAuthServerAuthorizationNotFoundError) Error() string + func (e OAuthServerAuthorizationNotFoundError) Is(target error) bool + type OAuthServerAuthorizationStatus string + const OAuthServerAuthorizationApproved + const OAuthServerAuthorizationDenied + const OAuthServerAuthorizationExpired + const OAuthServerAuthorizationPending + func (s OAuthServerAuthorizationStatus) String() string + type OAuthServerClient struct + ClientName *string + ClientSecretHash string + ClientType string + ClientURI *string + CreatedAt time.Time + DeletedAt *time.Time + GrantTypes string + ID uuid.UUID + LogoURI *string + RedirectURIs string + RegistrationType string + TokenEndpointAuthMethod string + UpdatedAt time.Time + func FindOAuthServerClientByID(tx *storage.Connection, id uuid.UUID) (*OAuthServerClient, error) + func (OAuthServerClient) TableName() string + func (c *OAuthServerClient) BeforeSave(tx *pop.Connection) error + func (c *OAuthServerClient) GetGrantTypes() []string + func (c *OAuthServerClient) GetRedirectURIs() []string + func (c *OAuthServerClient) GetTokenEndpointAuthMethod() string + func (c *OAuthServerClient) IsConfidential() bool + func (c *OAuthServerClient) IsGrantTypeAllowed(grantType string) bool + func (c *OAuthServerClient) IsPublic() bool + func (c *OAuthServerClient) SetGrantTypes(types []string) + func (c *OAuthServerClient) SetRedirectURIs(uris []string) + func (c *OAuthServerClient) Validate() error + type OAuthServerClientNotFoundError struct + func (e OAuthServerClientNotFoundError) Error() string + func (e OAuthServerClientNotFoundError) Is(target error) bool + type OAuthServerConsent struct + ClientID uuid.UUID + GrantedAt time.Time + ID uuid.UUID + RevokedAt *time.Time + Scopes string + UserID uuid.UUID + func FindActiveOAuthServerConsentByUserAndClient(tx *storage.Connection, userID uuid.UUID, clientID uuid.UUID) (*OAuthServerConsent, error) + func FindOAuthServerConsentByUserAndClient(tx *storage.Connection, userID uuid.UUID, clientID uuid.UUID) (*OAuthServerConsent, error) + func FindOAuthServerConsentsByUser(tx *storage.Connection, userID uuid.UUID, includeRevoked bool) ([]*OAuthServerConsent, error) + func NewOAuthServerConsent(userID uuid.UUID, clientID uuid.UUID, scopes []string) *OAuthServerConsent + func (OAuthServerConsent) TableName() string + func (consent *OAuthServerConsent) GetScopeList() []string + func (consent *OAuthServerConsent) HasAllScopes(requestedScopes []string) bool + func (consent *OAuthServerConsent) HasScope(scope string) bool + func (consent *OAuthServerConsent) IsRevoked() bool + func (consent *OAuthServerConsent) Revoke(tx *storage.Connection) error + func (consent *OAuthServerConsent) UpdateScopes(tx *storage.Connection, scopes []string) error + func (consent *OAuthServerConsent) Validate() error + type OAuthServerResponseType string + const OAuthServerResponseTypeCode + func (rt OAuthServerResponseType) String() string + type OIDCDiscovery struct + AuthorizationEndpoint string + GrantTypesSupported []string + Issuer string + JwksURI string + ResponseTypesSupported []string + ScopesSupported []string + SubjectTypesSupported []string + TokenEndpoint string + UserinfoEndpoint string + func (d *OIDCDiscovery) Scan(src interface{}) error + func (d *OIDCDiscovery) Value() (driver.Value, error) + type OneTimeToken struct + CreatedAt time.Time + ID uuid.UUID + RelatesTo string + TokenHash string + TokenType OneTimeTokenType + UpdatedAt time.Time + UserID uuid.UUID + func FindOneTimeToken(tx *storage.Connection, tokenHash string, tokenTypes ...OneTimeTokenType) (*OneTimeToken, error) + func (OneTimeToken) TableName() string + type OneTimeTokenNotFoundError struct + func (e OneTimeTokenNotFoundError) Error() string + func (e OneTimeTokenNotFoundError) Is(target error) bool + type OneTimeTokenType int + const ConfirmationToken + const EmailChangeTokenCurrent + const EmailChangeTokenNew + const PhoneChangeToken + const ReauthenticationToken + const RecoveryToken + func ParseOneTimeTokenType(s string) (OneTimeTokenType, error) + func (t *OneTimeTokenType) Scan(src interface{}) error + func (t OneTimeTokenType) String() string + func (t OneTimeTokenType) Value() (driver.Value, error) + type Pagination struct + Count uint64 + Page uint64 + PerPage uint64 + func (p *Pagination) Offset() uint64 + type ProviderType string + const ProviderTypeOAuth2 + const ProviderTypeOIDC + type RefreshToken struct + CreatedAt time.Time + DONTUSEINSTANCEID uuid.UUID + ID int64 + Parent storage.NullString + Revoked bool + SessionId *uuid.UUID + Token string + UpdatedAt time.Time + UserID uuid.UUID + func FindTokenBySessionID(tx *storage.Connection, sessionId *uuid.UUID) (*RefreshToken, error) + func GrantAuthenticatedUser(tx *storage.Connection, user *User, params GrantParams) (*RefreshToken, error) + func GrantRefreshTokenSwap(config conf.AuditLogConfiguration, r *http.Request, tx *storage.Connection, ...) (*RefreshToken, error) + func (RefreshToken) TableName() string + type RefreshTokenNotFoundError struct + func (e RefreshTokenNotFoundError) Error() string + func (e RefreshTokenNotFoundError) Is(target error) bool + type SAMLAttribute struct + Array bool + Default interface{} + Name string + Names []string + type SAMLAttributeMapping struct + Keys map[string]SAMLAttribute + func (m *SAMLAttributeMapping) Equal(o *SAMLAttributeMapping) bool + func (m *SAMLAttributeMapping) Scan(src interface{}) error + func (m SAMLAttributeMapping) Value() (driver.Value, error) + type SAMLProvider struct + AttributeMapping SAMLAttributeMapping + CreatedAt time.Time + EntityID string + ID uuid.UUID + MetadataURL *string + MetadataXML string + NameIDFormat *string + SSOProvider *SSOProvider + SSOProviderID uuid.UUID + UpdatedAt time.Time + func (p SAMLProvider) EntityDescriptor() (*saml.EntityDescriptor, error) + func (p SAMLProvider) TableName() string + type SAMLRelayState struct + CreatedAt time.Time + FlowState *FlowState + FlowStateID *uuid.UUID + ForEmail *string + ID uuid.UUID + RedirectTo string + RequestID string + SSOProviderID uuid.UUID + UpdatedAt time.Time + func FindSAMLRelayStateByID(tx *storage.Connection, id uuid.UUID) (*SAMLRelayState, error) + func (s SAMLRelayState) TableName() string + type SAMLRelayStateNotFoundError struct + func (e SAMLRelayStateNotFoundError) Error() string + func (e SAMLRelayStateNotFoundError) Is(target error) bool + type SSODomain struct + CreatedAt time.Time + Domain string + ID uuid.UUID + SSOProvider *SSOProvider + SSOProviderID uuid.UUID + UpdatedAt time.Time + func (d SSODomain) TableName() string + type SSOProvider struct + CreatedAt time.Time + Disabled *bool + ID uuid.UUID + ResourceID *string + SAMLProvider SAMLProvider + SSODomains []SSODomain + UpdatedAt time.Time + func FindAllSSOProviders(tx *storage.Connection) ([]SSOProvider, error) + func FindAllSSOProvidersByFilter(tx *storage.Connection, queryValues url.Values) ([]*SSOProvider, error) + func FindSAMLProviderByEntityID(tx *storage.Connection, entityId string) (*SSOProvider, error) + func FindSSOProviderByDomain(tx *storage.Connection, domain string) (*SSOProvider, error) + func FindSSOProviderByID(tx *storage.Connection, id uuid.UUID) (*SSOProvider, error) + func FindSSOProviderByResourceID(tx *storage.Connection, id string) (*SSOProvider, error) + func FindSSOProviderForEmailAddress(tx *storage.Connection, emailAddress string) (*SSOProvider, error) + func (p SSOProvider) IsEnabled() bool + func (p SSOProvider) TableName() string + func (p SSOProvider) Type() string + type SSOProviderNotFoundError struct + func (e SSOProviderNotFoundError) Error() string + func (e SSOProviderNotFoundError) Is(target error) bool + type Session struct + AAL *string + AMRClaims []AMRClaim + CreatedAt time.Time + FactorID *uuid.UUID + ID uuid.UUID + IP *string + NotAfter *time.Time + OAuthClientID *uuid.UUID + RefreshTokenCounter *int64 + RefreshTokenHmacKey *string + RefreshedAt *time.Time + Scopes *string + Tag *string + UpdatedAt time.Time + UserAgent *string + UserID uuid.UUID + func FindAllSessionsForUser(tx *storage.Connection, userId uuid.UUID, forUpdate bool) ([]*Session, error) + func FindSessionByID(tx *storage.Connection, id uuid.UUID, forUpdate bool) (*Session, error) + func FindSessionByUserID(tx *storage.Connection, userId uuid.UUID) (*Session, error) + func FindSessionsByFactorID(tx *storage.Connection, factorID uuid.UUID) ([]*Session, error) + func NewSession(userID uuid.UUID, factorID *uuid.UUID) (*Session, error) + func (Session) TableName() string + func (s *Session) ApplyGrantParams(params *GrantParams) + func (s *Session) CalculateAALAndAMR(user *User) (aal AuthenticatorAssuranceLevel, amr []AMREntry, err error) + func (s *Session) CheckValidity(config SessionValidityConfig, now time.Time, refreshTokenTime *time.Time, ...) SessionValidityReason + func (s *Session) DetermineTag(tags []string) string + func (s *Session) FindCurrentlyActiveRefreshToken(tx *storage.Connection) (*RefreshToken, error) + func (s *Session) GetAAL() string + func (s *Session) GetRefreshTokenHmacKey(dbEncryption conf.DatabaseEncryptionConfiguration) ([]byte, bool, error) + func (s *Session) GetScopeList() []string + func (s *Session) HasScope(scope string) bool + func (s *Session) IsAAL2() bool + func (s *Session) LastRefreshedAt(refreshTokenTime *time.Time) time.Time + func (s *Session) ReEncryptRefreshTokenHmacKey(tx *storage.Connection, dbEncryption conf.DatabaseEncryptionConfiguration) error + func (s *Session) SetupRefreshTokenData(dbEncryption conf.DatabaseEncryptionConfiguration) error + func (s *Session) UpdateAALAndAssociatedFactor(tx *storage.Connection, aal AuthenticatorAssuranceLevel, factorID *uuid.UUID) error + func (s *Session) UpdateOnlyRefreshInfo(tx *storage.Connection) error + func (s *Session) UpdateOnlyRefreshToken(tx *storage.Connection) error + func (s *Session) UpdateRefreshTokenCounterAndHmacKey(tx *storage.Connection) error + type SessionNotFoundError struct + func (e SessionNotFoundError) Error() string + func (e SessionNotFoundError) Is(target error) bool + type SessionValidityConfig struct + AllowLowAAL *time.Duration + InactivityTimeout *time.Duration + Timebox *time.Duration + type SessionValidityReason = int + type SortDirection string + const Ascending + const Descending + type SortField struct + Dir SortDirection + Name string + type SortParams struct + Fields []SortField + type User struct + AppMetaData JSONMap + Aud string + BannedUntil *time.Time + ConfirmationSentAt *time.Time + ConfirmationToken string + ConfirmedAt *time.Time + CreatedAt time.Time + DONTUSEINSTANCEID uuid.UUID + DeletedAt *time.Time + Email storage.NullString + EmailChange string + EmailChangeConfirmStatus int + EmailChangeSentAt *time.Time + EmailChangeTokenCurrent string + EmailChangeTokenNew string + EmailConfirmedAt *time.Time + EncryptedPassword *string + Factors []Factor + ID uuid.UUID + Identities []Identity + InvitedAt *time.Time + IsAnonymous bool + IsSSOUser bool + LastSignInAt *time.Time + Phone storage.NullString + PhoneChange string + PhoneChangeSentAt *time.Time + PhoneChangeToken string + PhoneConfirmedAt *time.Time + ReauthenticationSentAt *time.Time + ReauthenticationToken string + RecoverySentAt *time.Time + RecoveryToken string + Role string + UpdatedAt time.Time + UserMetaData JSONMap + func FindUserByConfirmationOrRecoveryToken(tx *storage.Connection, token string) (*User, error) + func FindUserByConfirmationToken(tx *storage.Connection, token string) (*User, error) + func FindUserByEmailAndAudience(tx *storage.Connection, email, aud string) (*User, error) + func FindUserByEmailChangeCurrentAndAudience(tx *storage.Connection, email, token, aud string) (*User, error) + func FindUserByEmailChangeNewAndAudience(tx *storage.Connection, email, token, aud string) (*User, error) + func FindUserByEmailChangeToken(tx *storage.Connection, token string) (*User, error) + func FindUserByID(tx *storage.Connection, id uuid.UUID) (*User, error) + func FindUserByPhoneAndAudience(tx *storage.Connection, phone, aud string) (*User, error) + func FindUserByPhoneChangeAndAudience(tx *storage.Connection, phone, aud string) (*User, error) + func FindUserByRecoveryToken(tx *storage.Connection, token string) (*User, error) + func FindUserForEmailChange(tx *storage.Connection, email, token, aud string, ...) (*User, error) + func FindUsersInAudience(tx *storage.Connection, aud string, pageParams *Pagination, ...) ([]*User, error) + func IsDuplicatedEmail(tx *storage.Connection, email, aud string, currentUser *User, ...) (*User, error) + func NewUser(phone, email, password, aud string, userData map[string]interface{}) (*User, error) + func NewUserWithPasswordHash(phone, email, passwordHash, aud string, userData map[string]interface{}) (*User, error) + func (User) TableName() string + func (u *User) Authenticate(ctx context.Context, tx *storage.Connection, password string, ...) (bool, bool, error) + func (u *User) Ban(tx *storage.Connection, duration time.Duration) error + func (u *User) BeforeSave(tx *pop.Connection) error + func (u *User) Confirm(tx *storage.Connection) error + func (u *User) ConfirmEmailChange(tx *storage.Connection, status int) error + func (u *User) ConfirmPhone(tx *storage.Connection) error + func (u *User) ConfirmPhoneChange(tx *storage.Connection) error + func (u *User) ConfirmReauthentication(tx *storage.Connection) error + func (u *User) FindOwnedFactorByID(tx *storage.Connection, factorID uuid.UUID) (*Factor, error) + func (u *User) GetEmail() string + func (u *User) GetPhone() string + func (u *User) HasBeenInvited() bool + func (u *User) HasMFAEnabled() bool + func (u *User) HasPassword() bool + func (u *User) HasRole(roleName string) bool + func (u *User) HighestPossibleAAL() AuthenticatorAssuranceLevel + func (u *User) IsBanned() bool + func (u *User) IsConfirmed() bool + func (u *User) IsPhoneConfirmed() bool + func (u *User) Recover(tx *storage.Connection) error + func (u *User) RemoveUnconfirmedIdentities(tx *storage.Connection, identity *Identity) error + func (u *User) SetEmail(tx *storage.Connection, email string) error + func (u *User) SetPassword(ctx context.Context, password string, encrypt bool, ...) error + func (u *User) SetPhone(tx *storage.Connection, phone string) error + func (u *User) SetRole(tx *storage.Connection, roleName string) error + func (u *User) SoftDeleteUser(tx *storage.Connection) error + func (u *User) SoftDeleteUserIdentities(tx *storage.Connection) error + func (u *User) UpdateAppMetaData(tx *storage.Connection, updates map[string]interface{}) error + func (u *User) UpdateAppMetaDataProviders(tx *storage.Connection) error + func (u *User) UpdateBannedUntil(tx *storage.Connection) error + func (u *User) UpdateLastSignInAt(tx *storage.Connection) error + func (u *User) UpdatePassword(tx *storage.Connection, sessionID *uuid.UUID) error + func (u *User) UpdateUserEmailFromIdentities(tx *storage.Connection) error + func (u *User) UpdateUserMetaData(tx *storage.Connection, updates map[string]interface{}) error + func (user *User) WebAuthnCredentials() []webauthn.Credential + func (user *User) WebAuthnDisplayName() string + func (user *User) WebAuthnID() []byte + func (user *User) WebAuthnName() string + type UserEmailUniqueConflictError struct + func (e UserEmailUniqueConflictError) Error() string + func (e UserEmailUniqueConflictError) Is(target error) bool + type UserNotFoundError struct + func (e UserNotFoundError) Error() string + func (e UserNotFoundError) Is(target error) bool + type WebAuthnChallenge struct + ChallengeType string + CreatedAt time.Time + ExpiresAt time.Time + ID uuid.UUID + SessionData *WebAuthnSessionData + UserID *uuid.UUID + func FindWebAuthnChallengeByID(conn *storage.Connection, id uuid.UUID) (*WebAuthnChallenge, error) + func NewWebAuthnChallenge(userID *uuid.UUID, challengeType string, sessionData *WebAuthnSessionData, ...) *WebAuthnChallenge + func (WebAuthnChallenge) TableName() string + func (c *WebAuthnChallenge) Delete(tx *storage.Connection) error + func (c *WebAuthnChallenge) IsExpired() bool + type WebAuthnChallengeNotFoundError struct + func (e WebAuthnChallengeNotFoundError) Error() string + func (e WebAuthnChallengeNotFoundError) Is(target error) bool + type WebAuthnCredential struct + AAGUID *uuid.UUID + AttestationType string + BackedUp bool + BackupEligible bool + CreatedAt time.Time + CredentialID []byte + FriendlyName string + ID uuid.UUID + LastUsedAt *time.Time + PublicKey []byte + SignCount uint32 + Transports WebAuthnTransports + UpdatedAt time.Time + UserID uuid.UUID + func FindWebAuthnCredentialByCredentialID(conn *storage.Connection, credentialID []byte) (*WebAuthnCredential, error) + func FindWebAuthnCredentialByID(conn *storage.Connection, id uuid.UUID) (*WebAuthnCredential, error) + func FindWebAuthnCredentialsByUserID(conn *storage.Connection, userID uuid.UUID) ([]*WebAuthnCredential, error) + func NewWebAuthnCredential(userID uuid.UUID, cred *webauthn.Credential, friendlyName string) *WebAuthnCredential + func (WebAuthnCredential) TableName() string + func (pc *WebAuthnCredential) Delete(tx *storage.Connection) error + func (pc *WebAuthnCredential) ToWebAuthnCredential() webauthn.Credential + func (pc *WebAuthnCredential) UpdateFriendlyName(tx *storage.Connection, friendlyName string) error + func (pc *WebAuthnCredential) UpdateLastUsedAt(tx *storage.Connection) error + func (pc *WebAuthnCredential) UpdateSignCount(tx *storage.Connection, signCount uint32) error + type WebAuthnCredentialNotFoundError struct + func (e WebAuthnCredentialNotFoundError) Error() string + func (e WebAuthnCredentialNotFoundError) Is(target error) bool + type WebAuthnSessionData struct + func (s *WebAuthnSessionData) Scan(value interface{}) error + func (s *WebAuthnSessionData) Value() (driver.Value, error) + func (ws *WebAuthnSessionData) ToChallenge(factorID uuid.UUID, ipAddress string) *Challenge + type WebAuthnTransports []protocol.AuthenticatorTransport + func (t *WebAuthnTransports) Scan(value interface{}) error + func (t WebAuthnTransports) Value() (driver.Value, error)