Documentation
¶
Index ¶
- Constants
- type AccessTokenClaims
- type AfterUserCreatedInput
- type AfterUserCreatedOutput
- type BeforeUserCreatedInput
- type BeforeUserCreatedOutput
- type CustomAccessTokenInput
- type CustomAccessTokenOutput
- type MFAVerificationAttemptInput
- type MFAVerificationAttemptOutput
- type Manager
- type Metadata
- type Name
- 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 (
HookRejection = "reject"
)
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"`
ClientID string `json:"client_id,omitempty"`
Scope string `json:"scope,omitempty"`
}
AccessTokenClaims is a struct thats used for JWT claims
type AfterUserCreatedInput ¶
type AfterUserCreatedInput struct {
Metadata *Metadata `json:"metadata"`
User *models.User `json:"user"`
}
func NewAfterUserCreatedInput ¶
func NewAfterUserCreatedInput( r *http.Request, user *models.User, ) *AfterUserCreatedInput
type AfterUserCreatedOutput ¶
type AfterUserCreatedOutput struct{}
type BeforeUserCreatedInput ¶
type BeforeUserCreatedInput struct {
Metadata *Metadata `json:"metadata"`
User *models.User `json:"user"`
}
func NewBeforeUserCreatedInput ¶
func NewBeforeUserCreatedInput( r *http.Request, user *models.User, ) *BeforeUserCreatedInput
type BeforeUserCreatedOutput ¶
type BeforeUserCreatedOutput struct {
}
type CustomAccessTokenInput ¶
type CustomAccessTokenInput struct {
Metadata *Metadata `json:"metadata"`
UserID uuid.UUID `json:"user_id"`
Claims *AccessTokenClaims `json:"claims"`
AuthenticationMethod string `json:"authentication_method"`
}
func NewCustomAccessTokenInput ¶
func NewCustomAccessTokenInput( r *http.Request, userID uuid.UUID, claims *AccessTokenClaims, authenticationMethod string, ) *CustomAccessTokenInput
type CustomAccessTokenOutput ¶
func (*CustomAccessTokenOutput) UnmarshalJSON ¶
func (o *CustomAccessTokenOutput) UnmarshalJSON(b []byte) error
type MFAVerificationAttemptInput ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager( config *conf.GlobalConfiguration, httpDr *hookshttp.Dispatcher, pgfuncDr *hookspgfunc.Dispatcher, ) *Manager
func (*Manager) InvokeHook ¶
type Metadata ¶
type Name ¶
type Name string
const ( SendSMS Name = "send-sms" SendEmail Name = "send-email" CustomizeAccessToken Name = "customize-access-token" MFAVerification Name = "mfa-verification" PasswordVerification Name = "password-verification" BeforeUserCreated Name = "before-user-created" AfterUserCreated Name = "after-user-created" )
type PasswordVerificationAttemptInput ¶
type PasswordVerificationAttemptInput struct {
Metadata *Metadata `json:"metadata"`
UserID uuid.UUID `json:"user_id"`
Valid bool `json:"valid"`
}
type SMS ¶
type SMS struct {
OTP string `json:"otp,omitempty"`
SMSType string `json:"sms_type,omitempty"`
Phone string `json:"phone,omitempty"`
}
TODO(joel): Move this to phone package
type SendEmailInput ¶
type SendEmailInput struct {
Metadata *Metadata `json:"metadata"`
User *models.User `json:"user"`
EmailData mailer.EmailData `json:"email_data"`
}
func NewSendEmailInput ¶
type SendEmailOutput ¶
type SendEmailOutput struct {
}
type SendSMSInput ¶
type SendSMSInput struct {
Metadata *Metadata `json:"metadata"`
User *models.User `json:"user,omitempty"`
SMS SMS `json:"sms,omitempty"`
}
func NewSendSMSInput ¶
type SendSMSOutput ¶
type SendSMSOutput struct {
}
Click to show internal directories.
Click to hide internal directories.