Documentation ¶
Index ¶
Constants ¶
View Source
const ( PublicVerificationInitPath = "/self-service/browser/flows/verification/:via" PublicVerificationCompletePath = "/self-service/browser/flows/verification/:via/complete" PublicVerificationRequestPath = "/self-service/browser/flows/requests/verification" PublicVerificationConfirmPath = "/self-service/browser/flows/verification/:via/confirm/:code" )
Variables ¶
View Source
var ErrUnknownAddress = errors.New("verification requested for unknown address")
Functions ¶
func TestPersister ¶
func TestPersister(p interface { Persister identity.PrivilegedPool }) func(t *testing.T)
Types ¶
type ErrorHandler ¶
type ErrorHandler struct {
// contains filtered or unexported fields
}
func NewErrorHandler ¶
func NewErrorHandler(d errorHandlerDependencies, c configuration.Provider) *ErrorHandler
func (*ErrorHandler) HandleVerificationError ¶
func (s *ErrorHandler) HandleVerificationError( w http.ResponseWriter, r *http.Request, rr *Request, err error, )
type ErrorHandlerProvider ¶
type ErrorHandlerProvider interface{ VerificationRequestErrorHandler() *ErrorHandler }
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(d handlerDependencies, c configuration.Provider) *Handler
func (*Handler) RegisterAdminRoutes ¶
func (h *Handler) RegisterAdminRoutes(admin *x.RouterAdmin)
func (*Handler) RegisterPublicRoutes ¶
func (h *Handler) RegisterPublicRoutes(public *x.RouterPublic)
type HandlerProvider ¶
type HandlerProvider interface {
VerificationHandler() *Handler
}
type PersistenceProvider ¶
type PersistenceProvider interface {
VerificationPersister() Persister
}
type Request ¶
type Request struct { // ID represents the request's unique ID. When performing the profile management flow, this // represents the id in the profile ui's query parameter: http://<urls.profile_ui>?request=<id> // // type: string // format: uuid ID uuid.UUID `json:"id" db:"id" faker:"uuid" rw:"r"` // ExpiresAt is the time (UTC) when the request expires. If the user still wishes to update the profile, // a new request has to be initiated. ExpiresAt time.Time `json:"expires_at" faker:"time_type" db:"expires_at"` // IssuedAt is the time (UTC) when the request occurred. IssuedAt time.Time `json:"issued_at" faker:"time_type" db:"issued_at"` // RequestURL is the initial URL that was requested from ORY Kratos. It can be used // to forward information contained in the URL's path or query for example. RequestURL string `json:"request_url" db:"request_url"` // Form contains form fields, errors, and so on. Form *form.HTMLForm `json:"form" faker:"-" db:"form"` Via identity.VerifiableAddressType `json:"via" db:"via"` // CSRFToken contains the anti-csrf token associated with this request. CSRFToken string `json:"-" db:"csrf_token"` // Success, if true, implies that the request was completed successfully. Success bool `json:"success" db:"success"` // CreatedAt is a helper struct field for gobuffalo.pop. CreatedAt time.Time `json:"-" faker:"-" db:"created_at"` // UpdatedAt is a helper struct field for gobuffalo.pop. UpdatedAt time.Time `json:"-" faker:"-" db:"updated_at"` }
Request presents a verification request
This request is used when an identity wants to verify an out-of-band communication channel such as an email address or a phone number.
For more information head over to: https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation
swagger:model verificationRequest
func NewRequest ¶
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
func NewSender ¶
func NewSender(r senderDependencies, c configuration.Provider) *Sender
func (*Sender) SendCode ¶
func (m *Sender) SendCode(ctx context.Context, via identity.VerifiableAddressType, value string) (*identity.VerifiableAddress, error)
SendCode sends a code to the specified address. If the address does not exist in the store, an email is still being sent to prevent account enumeration attacks. In that case, this function returns the ErrUnknownAddress error.
type SenderProvider ¶
type SenderProvider interface {
VerificationSender() *Sender
}
Click to show internal directories.
Click to hide internal directories.