Documentation ¶
Index ¶
Constants ¶
View Source
const ( PublicProfileManagementPath = "/self-service/browser/flows/profile" PublicProfileManagementRequestPath = "/self-service/browser/flows/requests/profile" AdminBrowserProfileRequestPath = "/self-service/browser/flows/requests/profile" PublicProfileManagementUpdatePath = "/self-service/browser/flows/profile/update" )
Variables ¶
View Source
var (
ErrRequestExpired = herodot.ErrBadRequest.
WithError("profile management request expired").
WithReasonf(`The profile management request has expired. Please restart the flow.`)
)
Functions ¶
func TestRequestPersister ¶
func TestRequestPersister(p interface { RequestPersister 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) HandleProfileManagementError ¶
func (s *ErrorHandler) HandleProfileManagementError( w http.ResponseWriter, r *http.Request, rr *Request, err error, )
type ErrorHandlerProvider ¶
type ErrorHandlerProvider interface{ ProfileRequestRequestErrorHandler() *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 {
ProfileManagementHandler() *Handler
}
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> // // required: true // 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. // // required: true ExpiresAt time.Time `json:"expires_at" faker:"time_type" db:"expires_at"` // IssuedAt is the time (UTC) when the request occurred. // // required: true 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. // // required: true RequestURL string `json:"request_url" db:"request_url"` // Form contains form fields, errors, and so on. // // required: true Form *form.HTMLForm `json:"form" db:"form"` // Identity contains all of the identity's data in raw form. // // required: true Identity *identity.Identity `json:"identity" faker:"identity" db:"-" belongs_to:"identities" fk_id:"IdentityID"` // UpdateSuccessful, if true, indicates that the profile has been updated successfully with the provided data. // Done will stay true when repeatedly checking. If set to true, done will revert back to false only // when a request with invalid (e.g. "please use a valid phone number") data was sent. // // required: true UpdateSuccessful bool `json:"update_successful,omitempty" faker:"-" db:"update_successful"` // IdentityID is a helper struct field for gobuffalo.pop. IdentityID uuid.UUID `json:"-" faker:"-" db:"identity_id"` // 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 profile management request
This request is used when an identity wants to update profile information (especially traits) in a selfservice manner.
For more information head over to: https://www.ory.sh/docs/kratos/selfservice/profile
swagger:model profileManagementRequest
type RequestPersistenceProvider ¶
type RequestPersistenceProvider interface {
ProfileRequestPersister() RequestPersister
}
Click to show internal directories.
Click to hide internal directories.