Documentation ¶
Index ¶
- Constants
- func ContextSetRoot(err *jsonschema.ValidationError, head string) *jsonschema.ValidationError
- func GetKeysInOrder(ctx context.Context, schemaRef string) ([]string, error)
- func IDToURL(host *url.URL, id string) *url.URL
- func NewAddressNotVerifiedError() error
- func NewDuplicateCredentialsError(err error) error
- func NewErrorValidationLookupInvalid() error
- func NewInvalidCredentialsError() error
- func NewLinkedCredentialsDoNotMatch() error
- func NewLoginCodeInvalid() error
- func NewLookupAlreadyUsed() error
- func NewMissingIdentifierError() error
- func NewNoCodeAuthnCredentials() error
- func NewNoLoginStrategyResponsible() error
- func NewNoLookupDefined() error
- func NewNoRecoveryStrategyResponsible() error
- func NewNoRegistrationStrategyResponsible() error
- func NewNoSettingsStrategyResponsible() error
- func NewNoTOTPDeviceRegistered() error
- func NewNoVerificationStrategyResponsible() error
- func NewNoWebAuthnCredentials() error
- func NewNoWebAuthnRegistered() error
- func NewPasswordPolicyViolationError(instancePtr string, message *text.Message) error
- func NewRegistrationCodeInvalid() error
- func NewRequiredError(missingPtr, missingFieldName string) error
- func NewTOTPVerifierWrongError(instancePtr string) error
- func NewTraitsMismatch() error
- func NewUnknownAddressError() error
- func NewValidationListError(errs []*ValidationError) error
- func NewWebAuthnVerifierWrongError(instancePtr string) error
- func WithExtensionRunner(e *ExtensionRunner) func(*validatorOptions)
- type CompileExtension
- type DefaultIdentitySchemaProvider
- type DuplicateCredentialsHinter
- type ExtensionConfig
- type ExtensionRunner
- type ExtensionRunnerOption
- type Handler
- type HandlerProvider
- type IdentitySchemaList
- type IdentitySchemaProvider
- type IdentitySchemas
- type Schema
- type Schemas
- type ValidateExtension
- type ValidationError
- type ValidationErrorContextDuplicateCredentialsError
- type ValidationErrorContextInvalidCredentialsError
- type ValidationErrorContextPasswordPolicyViolation
- type ValidationListError
- type ValidationProvider
- type Validator
Constants ¶
View Source
const (
ExtensionName string = "ory.sh/kratos"
)
View Source
const SchemasPath string = "schemas"
Variables ¶
This section is empty.
Functions ¶
func ContextSetRoot ¶
func ContextSetRoot(err *jsonschema.ValidationError, head string) *jsonschema.ValidationError
func NewAddressNotVerifiedError ¶
func NewAddressNotVerifiedError() error
func NewErrorValidationLookupInvalid ¶
func NewErrorValidationLookupInvalid() error
func NewInvalidCredentialsError ¶
func NewInvalidCredentialsError() error
func NewLinkedCredentialsDoNotMatch ¶ added in v1.1.0
func NewLinkedCredentialsDoNotMatch() error
func NewLoginCodeInvalid ¶ added in v1.1.0
func NewLoginCodeInvalid() error
func NewLookupAlreadyUsed ¶
func NewLookupAlreadyUsed() error
func NewMissingIdentifierError ¶
func NewMissingIdentifierError() error
func NewNoCodeAuthnCredentials ¶ added in v1.1.0
func NewNoCodeAuthnCredentials() error
func NewNoLoginStrategyResponsible ¶
func NewNoLoginStrategyResponsible() error
func NewNoLookupDefined ¶
func NewNoLookupDefined() error
func NewNoRecoveryStrategyResponsible ¶
func NewNoRecoveryStrategyResponsible() error
func NewNoRegistrationStrategyResponsible ¶
func NewNoRegistrationStrategyResponsible() error
func NewNoSettingsStrategyResponsible ¶
func NewNoSettingsStrategyResponsible() error
func NewNoTOTPDeviceRegistered ¶
func NewNoTOTPDeviceRegistered() error
func NewNoVerificationStrategyResponsible ¶
func NewNoVerificationStrategyResponsible() error
func NewNoWebAuthnCredentials ¶
func NewNoWebAuthnCredentials() error
func NewNoWebAuthnRegistered ¶
func NewNoWebAuthnRegistered() error
func NewRegistrationCodeInvalid ¶ added in v1.1.0
func NewRegistrationCodeInvalid() error
func NewRequiredError ¶
func NewTraitsMismatch ¶ added in v1.1.0
func NewTraitsMismatch() error
func NewUnknownAddressError ¶ added in v1.1.0
func NewUnknownAddressError() error
func NewValidationListError ¶ added in v0.11.0
func NewValidationListError(errs []*ValidationError) error
func WithExtensionRunner ¶
func WithExtensionRunner(e *ExtensionRunner) func(*validatorOptions)
Types ¶
type CompileExtension ¶ added in v1.1.0
type CompileExtension interface {
Run(ctx jsonschema.CompilerContext, config ExtensionConfig, rawSchema map[string]interface{}) error
}
type DefaultIdentitySchemaProvider ¶ added in v1.2.0
type DefaultIdentitySchemaProvider struct {
// contains filtered or unexported fields
}
func NewDefaultIdentityTraitsProvider ¶ added in v1.2.0
func NewDefaultIdentityTraitsProvider(d deps) *DefaultIdentitySchemaProvider
func (*DefaultIdentitySchemaProvider) IdentityTraitsSchemas ¶ added in v1.2.0
func (d *DefaultIdentitySchemaProvider) IdentityTraitsSchemas(ctx context.Context) (IdentitySchemaList, error)
type DuplicateCredentialsHinter ¶ added in v1.1.0
type ExtensionConfig ¶
type ExtensionConfig struct { Credentials struct { Password struct { Identifier bool `json:"identifier"` } `json:"password"` WebAuthn struct { Identifier bool `json:"identifier"` } `json:"webauthn"` Passkey struct { DisplayName bool `json:"display_name"` } `json:"passkey"` TOTP struct { AccountName bool `json:"account_name"` } `json:"totp"` Code struct { Identifier bool `json:"identifier"` Via string `json:"via"` } `json:"code"` } `json:"credentials"` Verification struct { Via string `json:"via"` } `json:"verification"` Recovery struct { Via string `json:"via"` } `json:"recovery"` RawSchema map[string]interface{} `json:"-"` }
func (*ExtensionConfig) EnhancePath ¶ added in v1.2.0
func (e *ExtensionConfig) EnhancePath(path jsonschemax.Path) map[string]any
type ExtensionRunner ¶
type ExtensionRunner struct {
// contains filtered or unexported fields
}
func NewExtensionRunner ¶
func NewExtensionRunner(ctx context.Context, opts ...ExtensionRunnerOption) (*ExtensionRunner, error)
func (*ExtensionRunner) AddRunner ¶
func (r *ExtensionRunner) AddRunner(run ValidateExtension) *ExtensionRunner
func (*ExtensionRunner) Extension ¶
func (r *ExtensionRunner) Extension() jsonschema.Extension
func (*ExtensionRunner) Finish ¶
func (r *ExtensionRunner) Finish() error
func (*ExtensionRunner) Register ¶
func (r *ExtensionRunner) Register(compiler *jsonschema.Compiler) *ExtensionRunner
type ExtensionRunnerOption ¶ added in v1.1.0
type ExtensionRunnerOption func(*ExtensionRunner)
func WithCompileRunners ¶ added in v1.1.0
func WithCompileRunners(runners ...CompileExtension) ExtensionRunnerOption
func WithValidateRunners ¶ added in v1.1.0
func WithValidateRunners(runners ...ValidateExtension) ExtensionRunnerOption
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(r handlerDependencies) *Handler
func (*Handler) ReadSchema ¶ added in v1.1.0
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 {
SchemaHandler() *Handler
}
type IdentitySchemaList ¶ added in v1.2.0
type IdentitySchemaProvider ¶ added in v1.2.0
type IdentitySchemaProvider interface {
IdentityTraitsSchemas(ctx context.Context) (IdentitySchemaList, error)
}
type IdentitySchemas ¶
type IdentitySchemas []identitySchemaContainer
List of Identity JSON Schemas
swagger:model identitySchemas
type Schema ¶
type ValidateExtension ¶ added in v1.1.0
type ValidateExtension interface { Run(ctx jsonschema.ValidationContext, config ExtensionConfig, value interface{}) error Finish() error }
type ValidationError ¶
func NewHookValidationError ¶ added in v0.11.0
func NewHookValidationError(instancePtr, message string, messages text.Messages) *ValidationError
type ValidationErrorContextDuplicateCredentialsError ¶
type ValidationErrorContextDuplicateCredentialsError struct { AvailableCredentials []string `json:"available_credential_types"` AvailableOIDCProviders []string `json:"available_oidc_providers"` IdentifierHint string `json:"credential_identifier_hint"` }
func (*ValidationErrorContextDuplicateCredentialsError) AddContext ¶
func (r *ValidationErrorContextDuplicateCredentialsError) AddContext(_, _ string)
func (*ValidationErrorContextDuplicateCredentialsError) FinishInstanceContext ¶
func (r *ValidationErrorContextDuplicateCredentialsError) FinishInstanceContext()
type ValidationErrorContextInvalidCredentialsError ¶
type ValidationErrorContextInvalidCredentialsError struct{}
func (*ValidationErrorContextInvalidCredentialsError) AddContext ¶
func (r *ValidationErrorContextInvalidCredentialsError) AddContext(_, _ string)
func (*ValidationErrorContextInvalidCredentialsError) FinishInstanceContext ¶
func (r *ValidationErrorContextInvalidCredentialsError) FinishInstanceContext()
type ValidationErrorContextPasswordPolicyViolation ¶
type ValidationErrorContextPasswordPolicyViolation struct {
Reason string
}
func (*ValidationErrorContextPasswordPolicyViolation) AddContext ¶
func (r *ValidationErrorContextPasswordPolicyViolation) AddContext(_, _ string)
func (*ValidationErrorContextPasswordPolicyViolation) FinishInstanceContext ¶
func (r *ValidationErrorContextPasswordPolicyViolation) FinishInstanceContext()
type ValidationListError ¶ added in v0.11.0
type ValidationListError struct {
Validations []*ValidationError
}
func (*ValidationListError) Add ¶ added in v0.11.0
func (e *ValidationListError) Add(v *ValidationError)
func (ValidationListError) Error ¶ added in v0.11.0
func (e ValidationListError) Error() string
func (ValidationListError) HasErrors ¶ added in v0.11.0
func (e ValidationListError) HasErrors() bool
type ValidationProvider ¶
type ValidationProvider interface {
SchemaValidator() *Validator
}
Click to show internal directories.
Click to hide internal directories.