Documentation ¶
Index ¶
- Constants
- Variables
- type AddressVerifier
- type CodeAddressVerifier
- type Error
- func (e Error) ExecuteLoginPostHook(w http.ResponseWriter, r *http.Request, g node.UiNodeGroup, a *login.Flow, ...) error
- func (e Error) ExecuteLoginPreHook(w http.ResponseWriter, r *http.Request, a *login.Flow) error
- func (e Error) ExecutePostRecoveryHook(w http.ResponseWriter, r *http.Request, a *recovery.Flow, s *session.Session) error
- func (e Error) ExecutePostRegistrationPostPersistHook(w http.ResponseWriter, r *http.Request, a *registration.Flow, ...) error
- func (e Error) ExecutePostRegistrationPrePersistHook(w http.ResponseWriter, r *http.Request, a *registration.Flow, ...) error
- func (e Error) ExecutePostVerificationHook(w http.ResponseWriter, r *http.Request, a *verification.Flow, ...) error
- func (e Error) ExecuteRecoveryPreHook(w http.ResponseWriter, r *http.Request, a *recovery.Flow) error
- func (e Error) ExecuteRegistrationPreHook(w http.ResponseWriter, r *http.Request, a *registration.Flow) error
- func (e Error) ExecuteSettingsPostPersistHook(w http.ResponseWriter, r *http.Request, a *settings.Flow, ...) error
- func (e Error) ExecuteSettingsPreHook(w http.ResponseWriter, r *http.Request, a *settings.Flow) error
- func (e Error) ExecuteSettingsPrePersistHook(w http.ResponseWriter, r *http.Request, a *settings.Flow, s *identity.Identity) error
- func (e Error) ExecuteVerificationPreHook(w http.ResponseWriter, r *http.Request, a *verification.Flow) error
- type PasswordMigration
- type PasswordMigrationRequest
- type PasswordMigrationResponse
- type SessionDestroyer
- func (e *SessionDestroyer) ExecuteLoginPostHook(_ http.ResponseWriter, r *http.Request, _ node.UiNodeGroup, _ *login.Flow, ...) error
- func (e *SessionDestroyer) ExecutePostRecoveryHook(_ http.ResponseWriter, r *http.Request, _ *recovery.Flow, s *session.Session) error
- func (e *SessionDestroyer) ExecuteSettingsPostPersistHook(_ http.ResponseWriter, r *http.Request, _ *settings.Flow, i *identity.Identity, ...) error
- type SessionIssuer
- type SessionIssuerProvider
- type ShowVerfificationUIProvider
- type ShowVerificationUIHook
- type TwoStepRegistration
- type Verifier
- func (e *Verifier) ExecuteLoginPostHook(w http.ResponseWriter, r *http.Request, g node.UiNodeGroup, f *login.Flow, ...) (err error)
- func (e *Verifier) ExecutePostRegistrationPostPersistHook(w http.ResponseWriter, r *http.Request, f *registration.Flow, ...) error
- func (e *Verifier) ExecuteSettingsPostPersistHook(w http.ResponseWriter, r *http.Request, f *settings.Flow, i *identity.Identity, ...) error
- type WebHook
- func (e *WebHook) ExecuteLoginPostHook(_ http.ResponseWriter, req *http.Request, _ node.UiNodeGroup, flow *login.Flow, ...) error
- func (e *WebHook) ExecuteLoginPreHook(_ http.ResponseWriter, req *http.Request, flow *login.Flow) error
- func (e *WebHook) ExecutePostRecoveryHook(_ http.ResponseWriter, req *http.Request, flow *recovery.Flow, ...) error
- func (e *WebHook) ExecutePostRegistrationPostPersistHook(_ http.ResponseWriter, req *http.Request, flow *registration.Flow, ...) error
- func (e *WebHook) ExecutePostRegistrationPrePersistHook(_ http.ResponseWriter, req *http.Request, flow *registration.Flow, ...) error
- func (e *WebHook) ExecutePostVerificationHook(_ http.ResponseWriter, req *http.Request, flow *verification.Flow, ...) error
- func (e *WebHook) ExecuteRecoveryPreHook(_ http.ResponseWriter, req *http.Request, flow *recovery.Flow) error
- func (e *WebHook) ExecuteRegistrationPreHook(_ http.ResponseWriter, req *http.Request, flow *registration.Flow) error
- func (e *WebHook) ExecuteSettingsPostPersistHook(_ http.ResponseWriter, req *http.Request, flow *settings.Flow, ...) error
- func (e *WebHook) ExecuteSettingsPreHook(_ http.ResponseWriter, req *http.Request, flow *settings.Flow) error
- func (e *WebHook) ExecuteSettingsPrePersistHook(_ http.ResponseWriter, req *http.Request, flow *settings.Flow, ...) error
- func (e *WebHook) ExecuteVerificationPreHook(_ http.ResponseWriter, req *http.Request, flow *verification.Flow) error
Constants ¶
View Source
const ( KeySessionIssuer = "session" KeySessionDestroyer = "revoke_active_sessions" KeyWebHook = "web_hook" KeyAddressVerifier = "require_verified_address" KeyVerificationUI = "show_verification_ui" KeyTwoStepRegistration = "two_step_registration" KeyVerifier = "verification" )
Variables ¶
View Source
var RequestHeaderAllowList = map[string]struct{}{
"Accept": {},
"Accept-Encoding": {},
"Accept-Language": {},
"Content-Length": {},
"Content-Type": {},
"Origin": {},
"Priority": {},
"Referer": {},
"Sec-Ch-Ua": {},
"Sec-Ch-Ua-Mobile": {},
"Sec-Ch-Ua-Platform": {},
"Sec-Fetch-Dest": {},
"Sec-Fetch-Mode": {},
"Sec-Fetch-Site": {},
"Sec-Fetch-User": {},
"True-Client-Ip": {},
"User-Agent": {},
}
RequestHeaderAllowList contains the allowed request headers that are forwarded to the web hook target in canonical form (textproto.CanonicalMIMEHeaderKey).
Functions ¶
This section is empty.
Types ¶
type AddressVerifier ¶
type AddressVerifier struct{}
func NewAddressVerifier ¶
func NewAddressVerifier() *AddressVerifier
func (*AddressVerifier) ExecuteLoginPostHook ¶
func (e *AddressVerifier) ExecuteLoginPostHook(_ http.ResponseWriter, _ *http.Request, _ node.UiNodeGroup, f *login.Flow, s *session.Session) error
type CodeAddressVerifier ¶ added in v1.1.0
type CodeAddressVerifier struct {
// contains filtered or unexported fields
}
func NewCodeAddressVerifier ¶ added in v1.1.0
func NewCodeAddressVerifier(r codeAddressDependencies) *CodeAddressVerifier
func (*CodeAddressVerifier) ExecutePostRegistrationPrePersistHook ¶ added in v1.1.0
func (cv *CodeAddressVerifier) ExecutePostRegistrationPrePersistHook(w http.ResponseWriter, r *http.Request, a *registration.Flow, i *identity.Identity) error
type Error ¶
type Error struct {
Config json.RawMessage
}
func (Error) ExecuteLoginPostHook ¶
func (Error) ExecuteLoginPreHook ¶
func (Error) ExecutePostRecoveryHook ¶
func (Error) ExecutePostRegistrationPostPersistHook ¶
func (e Error) ExecutePostRegistrationPostPersistHook(w http.ResponseWriter, r *http.Request, a *registration.Flow, s *session.Session) error
func (Error) ExecutePostRegistrationPrePersistHook ¶
func (e Error) ExecutePostRegistrationPrePersistHook(w http.ResponseWriter, r *http.Request, a *registration.Flow, i *identity.Identity) error
func (Error) ExecutePostVerificationHook ¶
func (e Error) ExecutePostVerificationHook(w http.ResponseWriter, r *http.Request, a *verification.Flow, i *identity.Identity) error
func (Error) ExecuteRecoveryPreHook ¶ added in v0.11.0
func (Error) ExecuteRegistrationPreHook ¶
func (e Error) ExecuteRegistrationPreHook(w http.ResponseWriter, r *http.Request, a *registration.Flow) error
func (Error) ExecuteSettingsPostPersistHook ¶
func (Error) ExecuteSettingsPreHook ¶ added in v0.11.0
func (Error) ExecuteSettingsPrePersistHook ¶
func (Error) ExecuteVerificationPreHook ¶ added in v0.11.0
func (e Error) ExecuteVerificationPreHook(w http.ResponseWriter, r *http.Request, a *verification.Flow) error
type PasswordMigration ¶ added in v1.3.0
type PasswordMigration struct {
// contains filtered or unexported fields
}
func NewPasswordMigrationHook ¶ added in v1.3.0
func NewPasswordMigrationHook(deps webHookDependencies, conf json.RawMessage) *PasswordMigration
func (*PasswordMigration) Execute ¶ added in v1.3.0
func (p *PasswordMigration) Execute(ctx context.Context, data *PasswordMigrationRequest) (err error)
type PasswordMigrationRequest ¶ added in v1.3.0
type PasswordMigrationResponse ¶ added in v1.3.0
type PasswordMigrationResponse struct {
Status string `json:"status"`
}
type SessionDestroyer ¶
type SessionDestroyer struct {
// contains filtered or unexported fields
}
func NewSessionDestroyer ¶
func NewSessionDestroyer(r sessionDestroyerDependencies) *SessionDestroyer
func (*SessionDestroyer) ExecuteLoginPostHook ¶
func (e *SessionDestroyer) ExecuteLoginPostHook(_ http.ResponseWriter, r *http.Request, _ node.UiNodeGroup, _ *login.Flow, s *session.Session) error
func (*SessionDestroyer) ExecutePostRecoveryHook ¶
func (e *SessionDestroyer) ExecutePostRecoveryHook(_ http.ResponseWriter, r *http.Request, _ *recovery.Flow, s *session.Session) error
func (*SessionDestroyer) ExecuteSettingsPostPersistHook ¶ added in v1.1.0
type SessionIssuer ¶
type SessionIssuer struct {
// contains filtered or unexported fields
}
func NewSessionIssuer ¶
func NewSessionIssuer(r sessionIssuerDependencies) *SessionIssuer
func (*SessionIssuer) ExecutePostRegistrationPostPersistHook ¶
func (e *SessionIssuer) ExecutePostRegistrationPostPersistHook(w http.ResponseWriter, r *http.Request, a *registration.Flow, s *session.Session) error
type SessionIssuerProvider ¶
type SessionIssuerProvider interface {
HookSessionIssuer() *SessionIssuer
}
type ShowVerfificationUIProvider ¶ added in v0.13.0
type ShowVerfificationUIProvider interface {
HookShowVerificationUI() *ShowVerificationUIHook
}
type ShowVerificationUIHook ¶ added in v0.13.0
type ShowVerificationUIHook struct {
// contains filtered or unexported fields
}
ShowVerificationUIHook is a post registration hook that redirects browser clients to the verification UI.
func NewShowVerificationUIHook ¶ added in v0.13.0
func NewShowVerificationUIHook(d showVerificationUIDependencies) *ShowVerificationUIHook
func (*ShowVerificationUIHook) ExecuteLoginPostHook ¶ added in v1.2.0
func (e *ShowVerificationUIHook) ExecuteLoginPostHook(_ http.ResponseWriter, r *http.Request, _ node.UiNodeGroup, f *login.Flow, _ *session.Session) error
ExecuteLoginPostHook adds redirect headers and status code if the request is a browser request. If the request is not a browser request, this hook does nothing.
func (*ShowVerificationUIHook) ExecutePostRegistrationPostPersistHook ¶ added in v0.13.0
func (e *ShowVerificationUIHook) ExecutePostRegistrationPostPersistHook(_ http.ResponseWriter, r *http.Request, f *registration.Flow, _ *session.Session) error
ExecutePostRegistrationPostPersistHook adds redirect headers and status code if the request is a browser request. If the request is not a browser request, this hook does nothing.
type TwoStepRegistration ¶ added in v1.2.0
type TwoStepRegistration struct {
// contains filtered or unexported fields
}
func NewTwoStepRegistration ¶ added in v1.2.0
func NewTwoStepRegistration(d twoStepRegistrationDeps) *TwoStepRegistration
func (*TwoStepRegistration) ExecuteRegistrationPreHook ¶ added in v1.2.0
func (e *TwoStepRegistration) ExecuteRegistrationPreHook(_ http.ResponseWriter, _ *http.Request, regFlow *registration.Flow) (err error)
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
func NewVerifier ¶
func NewVerifier(r verifierDependencies) *Verifier
func (*Verifier) ExecuteLoginPostHook ¶ added in v1.2.0
func (*Verifier) ExecutePostRegistrationPostPersistHook ¶
func (e *Verifier) ExecutePostRegistrationPostPersistHook(w http.ResponseWriter, r *http.Request, f *registration.Flow, s *session.Session) error
type WebHook ¶
type WebHook struct {
// contains filtered or unexported fields
}
func NewWebHook ¶
func NewWebHook(r webHookDependencies, c json.RawMessage) *WebHook
func (*WebHook) ExecuteLoginPostHook ¶
func (*WebHook) ExecuteLoginPreHook ¶
func (*WebHook) ExecutePostRecoveryHook ¶
func (*WebHook) ExecutePostRegistrationPostPersistHook ¶
func (e *WebHook) ExecutePostRegistrationPostPersistHook(_ http.ResponseWriter, req *http.Request, flow *registration.Flow, session *session.Session) error
func (*WebHook) ExecutePostRegistrationPrePersistHook ¶ added in v0.11.0
func (e *WebHook) ExecutePostRegistrationPrePersistHook(_ http.ResponseWriter, req *http.Request, flow *registration.Flow, id *identity.Identity) error
func (*WebHook) ExecutePostVerificationHook ¶
func (e *WebHook) ExecutePostVerificationHook(_ http.ResponseWriter, req *http.Request, flow *verification.Flow, id *identity.Identity) error
func (*WebHook) ExecuteRecoveryPreHook ¶ added in v0.11.0
func (*WebHook) ExecuteRegistrationPreHook ¶
func (e *WebHook) ExecuteRegistrationPreHook(_ http.ResponseWriter, req *http.Request, flow *registration.Flow) error
func (*WebHook) ExecuteSettingsPostPersistHook ¶
func (*WebHook) ExecuteSettingsPreHook ¶ added in v0.11.0
func (*WebHook) ExecuteSettingsPrePersistHook ¶ added in v0.11.0
func (*WebHook) ExecuteVerificationPreHook ¶ added in v0.11.0
func (e *WebHook) ExecuteVerificationPreHook(_ http.ResponseWriter, req *http.Request, flow *verification.Flow) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.