Documentation ¶
Index ¶
- Constants
- type AccessTokenClaims
- type AuthHookError
- type CustomAccessTokenInput
- type CustomAccessTokenOutput
- type HTTPHookInput
- type HookOutput
- type HookType
- type MFAVerificationAttemptInput
- type MFAVerificationAttemptOutput
- type PasswordVerificationAttemptInput
- type PasswordVerificationAttemptOutput
- type SMS
- type SendEmailInput
- type SendEmailOutput
- type SendSMSInput
- type SendSMSOutput
Constants ¶
View Source
const ( DefaultMFAHookRejectionMessage = "Further MFA verification attempts will be rejected." DefaultPasswordHookRejectionMessage = "Further password verification attempts will be rejected." )
View Source
const (
// In Miliseconds
DefaultTimeout = 2000
)
View Source
const (
HookRejection = "reject"
)
Hook Names
View Source
const MinimumViableTokenSchema = `` /* 1019-byte string literal not displayed */
#nosec
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenClaims ¶
type AccessTokenClaims struct { jwt.RegisteredClaims Email string `json:"email"` Phone string `json:"phone"` AppMetaData map[string]interface{} `json:"app_metadata"` UserMetaData map[string]interface{} `json:"user_metadata"` Role string `json:"role"` AuthenticatorAssuranceLevel string `json:"aal,omitempty"` AuthenticationMethodReference []models.AMREntry `json:"amr,omitempty"` SessionId string `json:"session_id,omitempty"` IsAnonymous bool `json:"is_anonymous"` }
AccessTokenClaims is a struct thats used for JWT claims
type AuthHookError ¶
type AuthHookError struct { HTTPCode int `json:"http_code,omitempty"` Message string `json:"message,omitempty"` }
func (*AuthHookError) Error ¶
func (a *AuthHookError) Error() string
type CustomAccessTokenInput ¶
type CustomAccessTokenInput struct { UserID uuid.UUID `json:"user_id"` Claims *AccessTokenClaims `json:"claims"` AuthenticationMethod string `json:"authentication_method"` }
type CustomAccessTokenOutput ¶
type CustomAccessTokenOutput struct { Claims map[string]interface{} `json:"claims"` HookError AuthHookError `json:"error,omitempty"` }
func (*CustomAccessTokenOutput) Error ¶
func (ca *CustomAccessTokenOutput) Error() string
func (*CustomAccessTokenOutput) IsError ¶
func (ca *CustomAccessTokenOutput) IsError() bool
type HTTPHookInput ¶
type HTTPHookInput interface {
IsHTTPHook()
}
type HookOutput ¶
type MFAVerificationAttemptOutput ¶
type MFAVerificationAttemptOutput struct { Decision string `json:"decision"` Message string `json:"message"` HookError AuthHookError `json:"error"` }
func (*MFAVerificationAttemptOutput) Error ¶
func (mf *MFAVerificationAttemptOutput) Error() string
func (*MFAVerificationAttemptOutput) IsError ¶
func (mf *MFAVerificationAttemptOutput) IsError() bool
type PasswordVerificationAttemptOutput ¶
type PasswordVerificationAttemptOutput struct { Decision string `json:"decision"` Message string `json:"message"` ShouldLogoutUser bool `json:"should_logout_user"` HookError AuthHookError `json:"error"` }
func (*PasswordVerificationAttemptOutput) Error ¶
func (p *PasswordVerificationAttemptOutput) Error() string
func (*PasswordVerificationAttemptOutput) IsError ¶
func (p *PasswordVerificationAttemptOutput) IsError() bool
type SendEmailInput ¶
type SendEmailOutput ¶
type SendEmailOutput struct {
HookError AuthHookError `json:"error,omitempty"`
}
func (*SendEmailOutput) Error ¶
func (cs *SendEmailOutput) Error() string
func (*SendEmailOutput) IsError ¶
func (cs *SendEmailOutput) IsError() bool
type SendSMSInput ¶
type SendSMSOutput ¶
type SendSMSOutput struct {
HookError AuthHookError `json:"error,omitempty"`
}
func (*SendSMSOutput) Error ¶
func (cs *SendSMSOutput) Error() string
func (*SendSMSOutput) IsError ¶
func (cs *SendSMSOutput) IsError() bool
Click to show internal directories.
Click to hide internal directories.