Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractStateFromQuery(query string) (state string, err error)
- func GenerateRandomState() string
- func GenerateToken() string
- func HashToken(token string) string
- func NewErrAccountManagementDuplicatedIdentity(originalErr error) error
- type AddIdentityUsernameInput
- type AddIdentityUsernameOutput
- type AddPasskeyInput
- type AddPasskeyOutput
- type AuthenticationInfoService
- type AuthenticatorService
- type ChangePrimaryPasswordInput
- type ChangePrimaryPasswordOutput
- type ChangeSecondaryPasswordInput
- type ChangeSecondaryPasswordOutput
- type CreateSecondaryPasswordInput
- type CreateSecondaryPasswordOutput
- type DeleteIdentityBiometricInput
- type DeleteIdentityBiometricOuput
- type DeleteIdentityEmailInput
- type DeleteIdentityEmailOutput
- type DeleteIdentityOAuthInput
- type DeleteIdentityOAuthOutput
- type DeleteIdentityPhoneInput
- type DeleteIdentityPhoneOutput
- type DeleteIdentityUsernameInput
- type DeleteIdentityUsernameOutput
- type DeleteOOBOTPAuthenticatorInput
- type DeleteOOBOTPAuthenticatorOutput
- type DeletePasskeyInput
- type DeletePasskeyOutput
- type DeleteSecondaryPasswordInput
- type DeleteSecondaryPasswordOutput
- type DeleteTOTPAuthenticatorInput
- type DeleteTOTPAuthenticatorOutput
- type EventService
- type FinishAddOOBOTPAuthenticatorInput
- type FinishAddOOBOTPAuthenticatorOutput
- type FinishAddTOTPAuthenticatorInput
- type FinishAddTOTPAuthenticatorOutput
- type FinishAddingIdentityOAuthInput
- type FinishAddingIdentityOAuthOutput
- type FinishAddingInput
- type FinishAddingOutput
- type GenerateRecoveryCodesInput
- type GenerateRecoveryCodesOutput
- type GenerateTokenOptions
- type IdentityService
- type MFAService
- type OAuthProvider
- type OTPCodeService
- type OTPSender
- type PasskeyService
- type RateLimitMiddleware
- type RateLimitMiddlewareJSONResponseWriter
- type RateLimitMiddlewareRateLimiter
- type RedisStore
- func (s *RedisStore) ConsumeToken(ctx context.Context, tokenStr string) (*Token, error)
- func (s *RedisStore) ConsumeToken_OAuth(ctx context.Context, tokenStr string) (*Token, error)
- func (s *RedisStore) GenerateToken(ctx context.Context, options GenerateTokenOptions) (string, error)
- func (s *RedisStore) GetToken(ctx context.Context, tokenStr string) (*Token, error)
- type ResumeAddIdentityEmailInput
- type ResumeAddIdentityEmailOutput
- type ResumeAddIdentityPhoneInput
- type ResumeAddIdentityPhoneOutput
- type ResumeAddOOBOTPAuthenticatorInput
- type ResumeAddOOBOTPAuthenticatorOutput
- type ResumeAddOrUpdateIdentityEmailInput
- type ResumeAddOrUpdateIdentityEmailOutput
- type ResumeAddOrUpdateIdentityPhoneInput
- type ResumeAddOrUpdateIdentityPhoneOutput
- type ResumeAddTOTPAuthenticatorInput
- type ResumeAddTOTPAuthenticatorOutput
- type ResumeUpdateIdentityEmailInput
- type ResumeUpdateIdentityEmailOutput
- type ResumeUpdateIdentityPhoneInput
- type ResumeUpdateIdentityPhoneOutput
- type Service
- func (s *Service) AddIdentityUsername(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*AddIdentityUsernameOutput, error)
- func (s *Service) AddPasskey(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*AddPasskeyOutput, error)
- func (s *Service) ChangePrimaryPassword(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*ChangePrimaryPasswordOutput, error)
- func (s *Service) ChangeSecondaryPassword(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*ChangeSecondaryPasswordOutput, error)
- func (s *Service) CheckIdentityVerified(ctx context.Context, info *identity.Info) (bool, error)
- func (s *Service) CreateSecondaryPassword(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*CreateSecondaryPasswordOutput, error)
- func (s *Service) DeleteIdentityBiometric(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*DeleteIdentityBiometricOuput, error)
- func (s *Service) DeleteIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*DeleteIdentityEmailOutput, error)
- func (s *Service) DeleteIdentityOAuth(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*DeleteIdentityOAuthOutput, error)
- func (s *Service) DeleteIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*DeleteIdentityPhoneOutput, error)
- func (s *Service) DeleteIdentityUsername(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*DeleteIdentityUsernameOutput, error)
- func (s *Service) DeleteOOBOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *DeleteOOBOTPAuthenticatorOutput, err error)
- func (s *Service) DeletePasskey(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*DeletePasskeyOutput, error)
- func (s *Service) DeleteSecondaryPassword(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*DeleteSecondaryPasswordOutput, error)
- func (s *Service) DeleteTOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *DeleteTOTPAuthenticatorOutput, err error)
- func (s *Service) FinishAddOOBOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *FinishAddOOBOTPAuthenticatorOutput, err error)
- func (s *Service) FinishAddTOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *FinishAddTOTPAuthenticatorOutput, err error)
- func (s *Service) FinishAdding(ctx context.Context, input *FinishAddingInput) (*FinishAddingOutput, error)
- func (s *Service) FinishAddingIdentityOAuth(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*FinishAddingIdentityOAuthOutput, error)
- func (s *Service) GenerateRecoveryCodes(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *GenerateRecoveryCodesOutput, err error)
- func (s *Service) GetToken(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*Token, error)
- func (s *Service) ResendOTPCode(ctx context.Context, resolvedSession session.ResolvedSession, ...) (err error)
- func (s *Service) ResumeAddIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *ResumeAddIdentityEmailOutput, err error)
- func (s *Service) ResumeAddIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *ResumeAddIdentityPhoneOutput, err error)
- func (s *Service) ResumeAddOOBOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *ResumeAddOOBOTPAuthenticatorOutput, err error)
- func (s *Service) ResumeAddOrUpdateIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*ResumeAddOrUpdateIdentityEmailOutput, error)
- func (s *Service) ResumeAddOrUpdateIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*ResumeAddOrUpdateIdentityPhoneOutput, error)
- func (s *Service) ResumeAddTOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *ResumeAddTOTPAuthenticatorOutput, err error)
- func (s *Service) ResumeUpdateIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *ResumeUpdateIdentityEmailOutput, err error)
- func (s *Service) ResumeUpdateIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, ...) (output *ResumeUpdateIdentityPhoneOutput, err error)
- func (s *Service) StartAddIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*StartAddIdentityEmailOutput, error)
- func (s *Service) StartAddIdentityOAuth(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*StartAddIdentityOAuthOutput, error)
- func (s *Service) StartAddIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*StartAddIdentityPhoneOutput, error)
- func (s *Service) StartAddOOBOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*StartAddOOBOTPAuthenticatorOutput, error)
- func (s *Service) StartAddTOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*StartAddTOTPAuthenticatorOutput, error)
- func (s *Service) StartAdding(ctx context.Context, input *StartAddingInput) (*StartAddingOutput, error)
- func (s *Service) StartUpdateIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*StartUpdateIdentityEmailOutput, error)
- func (s *Service) StartUpdateIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*StartUpdateIdentityPhoneOutput, error)
- func (s *Service) UpdateIdentityUsername(ctx context.Context, resolvedSession session.ResolvedSession, ...) (*UpdateIdentityUsernameOutput, error)
- func (s *Service) VerifyOTP(ctx context.Context, userID string, channel model.AuthenticatorOOBChannel, ...) error
- type StartAddIdentityEmailInput
- type StartAddIdentityEmailOutput
- type StartAddIdentityOAuthInput
- type StartAddIdentityOAuthOutput
- type StartAddIdentityPhoneInput
- type StartAddIdentityPhoneOutput
- type StartAddOOBOTPAuthenticatorInput
- type StartAddOOBOTPAuthenticatorOutput
- type StartAddTOTPAuthenticatorInput
- type StartAddTOTPAuthenticatorOutput
- type StartAddingInput
- type StartAddingOutput
- type StartUpdateIdentityEmailInput
- type StartUpdateIdentityEmailOutput
- type StartUpdateIdentityPhoneInput
- type StartUpdateIdentityPhoneOutput
- type Store
- type Token
- type TokenAuthenticator
- type TokenIdentity
- type UIInfoResolver
- type UpdateIdentityUsernameInput
- type UpdateIdentityUsernameOutput
- type UserService
- type VerificationService
Constants ¶
View Source
const (
AccountManagementAPIPerIP ratelimit.BucketName = "AccountManagementAPIPerIP"
)
Variables ¶
View Source
var DependencySet = wire.NewSet( wire.Struct(new(Service), "*"), wire.Struct(new(RedisStore), "*"), wire.Bind(new(Store), new(*RedisStore)), wire.Struct(new(RateLimitMiddleware), "*"), )
View Source
var ErrAccountManagementAuthenticatorNotOwnedbyToUser = apierrors.Invalid.WithReason("AccountManagementAuthenticatorNotOwnedByUser").New("authenticator not owned by current user")
View Source
var ErrAccountManagementIdentityNotOwnedbyToUser = apierrors.Invalid.WithReason("AccountManagementIdentityNotOwnedByUser").New("identity not owned by current user")
View Source
var ErrAccountManagementSecondaryAuthenticatorIsRequired = apierrors.Invalid.WithReason("AccountManagementSecondaryAuthenticatorIsRequired").New("at least one secondary authenticator is needed")
View Source
var ErrAccountManagementTokenInvalid = apierrors.Invalid.WithReason("AccountManagementTokenInvalid").New("invalid token")
View Source
var ErrAccountManagementTokenNotBoundToUser = apierrors.Invalid.WithReason("AccountManagementTokenNotBoundToUser").New("token is not bound to the current user")
View Source
var ErrOAuthStateNotBoundToToken = apierrors.Invalid.WithReason("AccountManagementOAuthStateNotBoundToToken").New("the state parameter in query is not bound to token")
View Source
var ErrOAuthTokenInvalid = apierrors.Invalid.WithReason("AccountManagementOAuthTokenInvalid").New("invalid token")
View Source
var ErrOAuthTokenNotBoundToUser = apierrors.Invalid.WithReason("AccountManagementOAuthTokenNotBoundToUser").New("token is not bound to the current user")
Functions ¶
func ExtractStateFromQuery ¶
func GenerateRandomState ¶
func GenerateRandomState() string
func GenerateToken ¶
func GenerateToken() string
Types ¶
type AddPasskeyInput ¶
type AddPasskeyInput struct {
CreationResponse *protocol.CredentialCreationResponse
}
type AddPasskeyOutput ¶
type AuthenticationInfoService ¶
type AuthenticationInfoService interface {
Save(ctx context.Context, entry *authenticationinfo.Entry) error
}
type AuthenticatorService ¶
type AuthenticatorService interface { New(ctx context.Context, spec *authenticator.Spec) (*authenticator.Info, error) NewWithAuthenticatorID(ctx context.Context, authenticatorID string, spec *authenticator.Spec) (*authenticator.Info, error) UpdatePassword(ctx context.Context, authenticatorInfo *authenticator.Info, options *service.UpdatePasswordOptions) (changed bool, info *authenticator.Info, err error) Get(ctx context.Context, authenticatorID string) (*authenticator.Info, error) List(ctx context.Context, userID string, filters ...authenticator.Filter) ([]*authenticator.Info, error) Create(ctx context.Context, authenticatorInfo *authenticator.Info, markVerified bool) error Update(ctx context.Context, authenticatorInfo *authenticator.Info) error Delete(ctx context.Context, authenticatorInfo *authenticator.Info) error VerifyWithSpec(ctx context.Context, info *authenticator.Info, spec *authenticator.Spec, options *facade.VerifyOptions) (verifyResult *service.VerifyResult, err error) }
type ChangePrimaryPasswordOutput ¶
type ChangePrimaryPasswordOutput struct {
RedirectURI string
}
type ChangeSecondaryPasswordOutput ¶
type ChangeSecondaryPasswordOutput struct { }
type CreateSecondaryPasswordInput ¶
type CreateSecondaryPasswordInput struct {
PlainPassword string
}
type CreateSecondaryPasswordOutput ¶
type CreateSecondaryPasswordOutput struct { }
type DeleteIdentityBiometricInput ¶
type DeleteIdentityBiometricInput struct {
IdentityID string
}
type DeleteIdentityEmailInput ¶
type DeleteIdentityEmailInput struct {
IdentityID string
}
type DeleteIdentityOAuthInput ¶
type DeleteIdentityOAuthInput struct {
IdentityID string
}
type DeleteIdentityPhoneInput ¶
type DeleteIdentityPhoneInput struct {
IdentityID string
}
type DeleteIdentityUsernameInput ¶
type DeleteIdentityUsernameInput struct {
IdentityID string
}
type DeleteOOBOTPAuthenticatorInput ¶
type DeleteOOBOTPAuthenticatorInput struct {
AuthenticatorID string
}
type DeleteOOBOTPAuthenticatorOutput ¶
type DeleteOOBOTPAuthenticatorOutput struct {
Info *authenticator.Info
}
type DeletePasskeyInput ¶
type DeletePasskeyInput struct {
IdentityID string
}
type DeletePasskeyOutput ¶
type DeleteSecondaryPasswordInput ¶
type DeleteSecondaryPasswordInput struct { }
type DeleteSecondaryPasswordOutput ¶
type DeleteSecondaryPasswordOutput struct { }
type DeleteTOTPAuthenticatorInput ¶
type DeleteTOTPAuthenticatorInput struct {
AuthenticatorID string
}
type DeleteTOTPAuthenticatorOutput ¶
type DeleteTOTPAuthenticatorOutput struct {
Info *authenticator.Info
}
type EventService ¶
type FinishAddOOBOTPAuthenticatorInput ¶
type FinishAddOOBOTPAuthenticatorInput struct { }
type FinishAddOOBOTPAuthenticatorOutput ¶
type FinishAddOOBOTPAuthenticatorOutput struct {
Info *authenticator.Info
}
type FinishAddTOTPAuthenticatorInput ¶
type FinishAddTOTPAuthenticatorInput struct { }
type FinishAddTOTPAuthenticatorOutput ¶
type FinishAddTOTPAuthenticatorOutput struct {
Info *authenticator.Info
}
type FinishAddingIdentityOAuthOutput ¶
type FinishAddingIdentityOAuthOutput struct { }
type FinishAddingInput ¶
type FinishAddingOutput ¶
type FinishAddingOutput struct { }
type GenerateRecoveryCodesInput ¶
type GenerateRecoveryCodesInput struct { }
type GenerateRecoveryCodesOutput ¶
type GenerateRecoveryCodesOutput struct {
Info *authenticator.Info
}
type GenerateTokenOptions ¶
type GenerateTokenOptions struct { UserID string // OAuth Alias string MaybeState string RedirectURI string // Phone IdentityChannel model.AuthenticatorOOBChannel IdentityPhoneNumber string // Email IdentityEmail string // IdentityID for updating identity IdentityID string // AuthenticatorID for updating authenticator AuthenticatorID string AuthenticatorRecoveryCodes []string AuthenticatorRecoveryCodesCreated bool AuthenticatorType model.AuthenticatorType // TOTP AuthenticatorTOTPIssuer string AuthenticatorTOTPEndUserAccountID string AuthenticatorTOTPDisplayName string AuthenticatorTOTPSecret string AuthenticatorTOTPVerified bool // OOB OTP AuthenticatorOOBOTPChannel model.AuthenticatorOOBChannel AuthenticatorOOBOTPTarget string AuthenticatorOOBOTPVerified bool }
type IdentityService ¶
type IdentityService interface { New(ctx context.Context, userID string, spec *identity.Spec, options identity.NewIdentityOptions) (*identity.Info, error) UpdateWithSpec(ctx context.Context, is *identity.Info, spec *identity.Spec, options identity.NewIdentityOptions) (*identity.Info, error) Get(ctx context.Context, id string) (*identity.Info, error) ListByUser(ctx context.Context, userID string) ([]*identity.Info, error) CheckDuplicated(ctx context.Context, info *identity.Info) (dupe *identity.Info, err error) Create(ctx context.Context, info *identity.Info) error Update(ctx context.Context, oldInfo *identity.Info, newInfo *identity.Info) error Delete(ctx context.Context, is *identity.Info) error }
type MFAService ¶
type OAuthProvider ¶
type OAuthProvider interface { GetProviderConfig(alias string) (oauthrelyingparty.ProviderConfig, error) GetAuthorizationURL(ctx context.Context, alias string, options oauthrelyingparty.GetAuthorizationURLOptions) (string, error) GetUserProfile(ctx context.Context, alias string, options oauthrelyingparty.GetUserProfileOptions) (oauthrelyingparty.UserProfile, error) }
type OTPCodeService ¶
type PasskeyService ¶
type RateLimitMiddleware ¶
type RateLimitMiddleware struct { RateLimiter RateLimitMiddlewareRateLimiter RemoteIP httputil.RemoteIP JSON RateLimitMiddlewareJSONResponseWriter }
type RateLimitMiddlewareJSONResponseWriter ¶
type RateLimitMiddlewareJSONResponseWriter interface {
WriteResponse(rw http.ResponseWriter, resp *api.Response)
}
type RateLimitMiddlewareRateLimiter ¶
type RateLimitMiddlewareRateLimiter interface {
Allow(ctx context.Context, spec ratelimit.BucketSpec) (*ratelimit.FailedReservation, error)
}
type RedisStore ¶
func (*RedisStore) ConsumeToken ¶
func (*RedisStore) ConsumeToken_OAuth ¶
func (*RedisStore) GenerateToken ¶
func (s *RedisStore) GenerateToken(ctx context.Context, options GenerateTokenOptions) (string, error)
type ResumeAddOOBOTPAuthenticatorInput ¶
type ResumeAddOOBOTPAuthenticatorInput struct {
Code string
}
type Service ¶
type Service struct { Database *appdb.Handle Config *config.AppConfig HTTPOrigin httputil.HTTPOrigin Users UserService Store Store OAuthProvider OAuthProvider Identities IdentityService Events EventService OTPSender OTPSender OTPCodeService OTPCodeService Authenticators AuthenticatorService AuthenticationInfoService AuthenticationInfoService MFA MFAService PasskeyService PasskeyService Verification VerificationService UIInfoResolver UIInfoResolver }
func (*Service) AddIdentityUsername ¶
func (s *Service) AddIdentityUsername(ctx context.Context, resolvedSession session.ResolvedSession, input *AddIdentityUsernameInput) (*AddIdentityUsernameOutput, error)
func (*Service) AddPasskey ¶
func (s *Service) AddPasskey(ctx context.Context, resolvedSession session.ResolvedSession, input *AddPasskeyInput) (*AddPasskeyOutput, error)
func (*Service) ChangePrimaryPassword ¶
func (s *Service) ChangePrimaryPassword(ctx context.Context, resolvedSession session.ResolvedSession, input *ChangePrimaryPasswordInput) (*ChangePrimaryPasswordOutput, error)
If have OAuthSessionID, it means the user is changing password after login with SDK. Then do special handling such as authenticationInfo
func (*Service) ChangeSecondaryPassword ¶
func (s *Service) ChangeSecondaryPassword(ctx context.Context, resolvedSession session.ResolvedSession, input *ChangeSecondaryPasswordInput) (*ChangeSecondaryPasswordOutput, error)
func (*Service) CheckIdentityVerified ¶
func (*Service) CreateSecondaryPassword ¶
func (s *Service) CreateSecondaryPassword(ctx context.Context, resolvedSession session.ResolvedSession, input CreateSecondaryPasswordInput) (*CreateSecondaryPasswordOutput, error)
func (*Service) DeleteIdentityBiometric ¶
func (s *Service) DeleteIdentityBiometric(ctx context.Context, resolvedSession session.ResolvedSession, input *DeleteIdentityBiometricInput) (*DeleteIdentityBiometricOuput, error)
func (*Service) DeleteIdentityEmail ¶
func (s *Service) DeleteIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, input *DeleteIdentityEmailInput) (*DeleteIdentityEmailOutput, error)
func (*Service) DeleteIdentityOAuth ¶
func (s *Service) DeleteIdentityOAuth(ctx context.Context, resolvedSession session.ResolvedSession, input *DeleteIdentityOAuthInput) (*DeleteIdentityOAuthOutput, error)
func (*Service) DeleteIdentityPhone ¶
func (s *Service) DeleteIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, input *DeleteIdentityPhoneInput) (*DeleteIdentityPhoneOutput, error)
func (*Service) DeleteIdentityUsername ¶
func (s *Service) DeleteIdentityUsername(ctx context.Context, resolvedSession session.ResolvedSession, input *DeleteIdentityUsernameInput) (*DeleteIdentityUsernameOutput, error)
func (*Service) DeleteOOBOTPAuthenticator ¶
func (s *Service) DeleteOOBOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, input *DeleteOOBOTPAuthenticatorInput) (output *DeleteOOBOTPAuthenticatorOutput, err error)
func (*Service) DeletePasskey ¶
func (s *Service) DeletePasskey(ctx context.Context, resolvedSession session.ResolvedSession, input *DeletePasskeyInput) (*DeletePasskeyOutput, error)
func (*Service) DeleteSecondaryPassword ¶
func (s *Service) DeleteSecondaryPassword(ctx context.Context, resolvedSession session.ResolvedSession, input *DeleteSecondaryPasswordInput) (*DeleteSecondaryPasswordOutput, error)
func (*Service) DeleteTOTPAuthenticator ¶
func (s *Service) DeleteTOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, input *DeleteTOTPAuthenticatorInput) (output *DeleteTOTPAuthenticatorOutput, err error)
func (*Service) FinishAddOOBOTPAuthenticator ¶
func (s *Service) FinishAddOOBOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, tokenString string, input *FinishAddOOBOTPAuthenticatorInput) (output *FinishAddOOBOTPAuthenticatorOutput, err error)
func (*Service) FinishAddTOTPAuthenticator ¶
func (s *Service) FinishAddTOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, tokenString string, input *FinishAddTOTPAuthenticatorInput) (output *FinishAddTOTPAuthenticatorOutput, err error)
func (*Service) FinishAdding ¶
func (s *Service) FinishAdding(ctx context.Context, input *FinishAddingInput) (*FinishAddingOutput, error)
func (*Service) FinishAddingIdentityOAuth ¶
func (s *Service) FinishAddingIdentityOAuth(ctx context.Context, resolvedSession session.ResolvedSession, input *FinishAddingIdentityOAuthInput) (*FinishAddingIdentityOAuthOutput, error)
func (*Service) GenerateRecoveryCodes ¶
func (s *Service) GenerateRecoveryCodes(ctx context.Context, resolvedSession session.ResolvedSession, input *GenerateRecoveryCodesInput) (output *GenerateRecoveryCodesOutput, err error)
func (*Service) ResendOTPCode ¶
func (*Service) ResumeAddIdentityEmail ¶
func (s *Service) ResumeAddIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, tokenString string, input *ResumeAddIdentityEmailInput) (output *ResumeAddIdentityEmailOutput, err error)
func (*Service) ResumeAddIdentityPhone ¶
func (s *Service) ResumeAddIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, tokenString string, input *ResumeAddIdentityPhoneInput) (output *ResumeAddIdentityPhoneOutput, err error)
func (*Service) ResumeAddOOBOTPAuthenticator ¶
func (s *Service) ResumeAddOOBOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, tokenString string, input *ResumeAddOOBOTPAuthenticatorInput) (output *ResumeAddOOBOTPAuthenticatorOutput, err error)
func (*Service) ResumeAddOrUpdateIdentityEmail ¶
func (s *Service) ResumeAddOrUpdateIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, tokenString string, input *ResumeAddOrUpdateIdentityEmailInput) (*ResumeAddOrUpdateIdentityEmailOutput, error)
func (*Service) ResumeAddOrUpdateIdentityPhone ¶
func (s *Service) ResumeAddOrUpdateIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, tokenString string, input *ResumeAddOrUpdateIdentityPhoneInput) (*ResumeAddOrUpdateIdentityPhoneOutput, error)
func (*Service) ResumeAddTOTPAuthenticator ¶
func (s *Service) ResumeAddTOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, tokenString string, input *ResumeAddTOTPAuthenticatorInput) (output *ResumeAddTOTPAuthenticatorOutput, err error)
func (*Service) ResumeUpdateIdentityEmail ¶
func (s *Service) ResumeUpdateIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, tokenString string, input *ResumeUpdateIdentityEmailInput) (output *ResumeUpdateIdentityEmailOutput, err error)
func (*Service) ResumeUpdateIdentityPhone ¶
func (s *Service) ResumeUpdateIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, tokenString string, input *ResumeUpdateIdentityPhoneInput) (output *ResumeUpdateIdentityPhoneOutput, err error)
func (*Service) StartAddIdentityEmail ¶
func (s *Service) StartAddIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, input *StartAddIdentityEmailInput) (*StartAddIdentityEmailOutput, error)
func (*Service) StartAddIdentityOAuth ¶
func (s *Service) StartAddIdentityOAuth(ctx context.Context, resolvedSession session.ResolvedSession, input *StartAddIdentityOAuthInput) (*StartAddIdentityOAuthOutput, error)
func (*Service) StartAddIdentityPhone ¶
func (s *Service) StartAddIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, input *StartAddIdentityPhoneInput) (*StartAddIdentityPhoneOutput, error)
func (*Service) StartAddOOBOTPAuthenticator ¶
func (s *Service) StartAddOOBOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, input *StartAddOOBOTPAuthenticatorInput) (*StartAddOOBOTPAuthenticatorOutput, error)
func (*Service) StartAddTOTPAuthenticator ¶
func (s *Service) StartAddTOTPAuthenticator(ctx context.Context, resolvedSession session.ResolvedSession, input *StartAddTOTPAuthenticatorInput) (*StartAddTOTPAuthenticatorOutput, error)
func (*Service) StartAdding ¶
func (s *Service) StartAdding(ctx context.Context, input *StartAddingInput) (*StartAddingOutput, error)
func (*Service) StartUpdateIdentityEmail ¶
func (s *Service) StartUpdateIdentityEmail(ctx context.Context, resolvedSession session.ResolvedSession, input *StartUpdateIdentityEmailInput) (*StartUpdateIdentityEmailOutput, error)
func (*Service) StartUpdateIdentityPhone ¶
func (s *Service) StartUpdateIdentityPhone(ctx context.Context, resolvedSession session.ResolvedSession, input *StartUpdateIdentityPhoneInput) (*StartUpdateIdentityPhoneOutput, error)
func (*Service) UpdateIdentityUsername ¶
func (s *Service) UpdateIdentityUsername(ctx context.Context, resolvedSession session.ResolvedSession, input *UpdateIdentityUsernameInput) (*UpdateIdentityUsernameOutput, error)
type StartAddIdentityPhoneInput ¶
type StartAddIdentityPhoneInput struct { Channel model.AuthenticatorOOBChannel LoginID string LoginIDKey string }
type StartAddOOBOTPAuthenticatorInput ¶
type StartAddOOBOTPAuthenticatorInput struct { Channel model.AuthenticatorOOBChannel Target string }
type StartAddOOBOTPAuthenticatorOutput ¶
type StartAddOOBOTPAuthenticatorOutput struct {
Token string
}
type StartAddTOTPAuthenticatorInput ¶
type StartAddTOTPAuthenticatorInput struct{}
type StartAddingInput ¶
type StartAddingOutput ¶
type StartUpdateIdentityPhoneInput ¶
type StartUpdateIdentityPhoneInput struct { Channel model.AuthenticatorOOBChannel IdentityID string LoginID string LoginIDKey string }
type Store ¶
type Store interface { GenerateToken(ctx context.Context, options GenerateTokenOptions) (string, error) GetToken(ctx context.Context, tokenStr string) (*Token, error) ConsumeToken(ctx context.Context, tokenStr string) (*Token, error) ConsumeToken_OAuth(ctx context.Context, tokenStr string) (*Token, error) }
type Token ¶
type Token struct { AppID string `json:"app_id,omitempty"` UserID string `json:"user_id,omitempty"` TokenHash string `json:"token_hash,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` ExpireAt *time.Time `json:"expire_at,omitempty"` // Adding OAuth Alias string `json:"alias,omitempty"` RedirectURI string `json:"redirect_uri,omitempty"` State string `json:"state,omitempty"` // Adding Identity Identity *TokenIdentity `json:"token_identity,omitempty"` // Authenticator Authenticator *TokenAuthenticator `json:"token_authenticator,omitempty"` }
func (*Token) CheckState ¶
func (*Token) CheckUser_OAuth ¶
type TokenAuthenticator ¶
type TokenAuthenticator struct { AuthenticatorID string `json:"authenticator_id,omitempty"` AuthenticatorType string `json:"authenticator_type,omitempty"` // Recovery Codes RecoveryCodes []string `json:"recovery_codes,omitempty"` RecoveryCodesCreated bool `json:"recovery_codes_created,omitempty"` // TOTP TOTPIssuer string `json:"totp_issuer,omitempty"` TOTPDisplayName string `json:"totp_display_name,omitempty"` TOTPEndUserAccountID string `json:"end_user_account_id,omitempty"` TOTPSecret string `json:"totp_secret,omitempty"` TOTPVerified bool `json:"totp_verified,omitempty"` // OOB OTP OOBOTPChannel model.AuthenticatorOOBChannel `json:"oob_otp_channel,omitempty"` OOBOTPTarget string `json:"oob_otp_target,omitempty"` OOBOTPVerified bool `json:"oob_otp_verified,omitempty"` }
type TokenIdentity ¶
type UIInfoResolver ¶
type UIInfoResolver interface {
SetAuthenticationInfoInQuery(redirectURI string, e *authenticationinfo.Entry) string
}
type UserService ¶
type VerificationService ¶
type VerificationService interface { NewVerifiedClaim(ctx context.Context, userID string, claimName string, claimValue string) *verification.Claim MarkClaimVerified(ctx context.Context, claim *verification.Claim) error GetIdentityVerificationStatus(ctx context.Context, i *identity.Info) ([]verification.ClaimStatus, error) }
Click to show internal directories.
Click to hide internal directories.