2021-05-04 22:06:05 +00:00
package oidc
2022-10-20 02:16:36 +00:00
import (
"errors"
"github.com/ory/fosite"
)
2021-05-04 22:06:05 +00:00
2023-05-14 23:51:59 +00:00
var errPasswordsDoNotMatch = errors . New ( "The provided client secret did not match the registered client secret." )
2022-10-20 02:16:36 +00:00
var (
2023-03-06 03:58:50 +00:00
// ErrIssuerCouldNotDerive is sent when the issuer couldn't be determined from the headers.
ErrIssuerCouldNotDerive = fosite . ErrServerError . WithHint ( "Could not safely derive the issuer." )
// ErrSubjectCouldNotLookup is sent when the Subject Identifier for a user couldn't be generated or obtained from the database.
ErrSubjectCouldNotLookup = fosite . ErrServerError . WithHint ( "Could not lookup user subject." )
// ErrConsentCouldNotPerform is sent when the Consent Session couldn't be performed for varying reasons.
ErrConsentCouldNotPerform = fosite . ErrServerError . WithHint ( "Could not perform consent." )
// ErrConsentCouldNotGenerate is sent when the Consent Session failed to be generated for some reason, usually a failed UUIDv4 generation.
ErrConsentCouldNotGenerate = fosite . ErrServerError . WithHint ( "Could not generate the consent session." )
// ErrConsentCouldNotSave is sent when the Consent Session couldn't be saved to the database.
ErrConsentCouldNotSave = fosite . ErrServerError . WithHint ( "Could not save the consent session." )
// ErrConsentCouldNotLookup is sent when the Consent ID is not a known UUID.
ErrConsentCouldNotLookup = fosite . ErrServerError . WithHint ( "Failed to lookup the consent session." )
// ErrConsentMalformedChallengeID is sent when the Consent ID is not a UUID.
2022-10-20 02:16:36 +00:00
ErrConsentMalformedChallengeID = fosite . ErrServerError . WithHint ( "Malformed consent session challenge ID." )
2023-03-06 03:58:50 +00:00
// ErrPAREnforcedClientMissingPAR is sent when a client has EnforcePAR configured but the Authorization Request was not Pushed.
ErrPAREnforcedClientMissingPAR = fosite . ErrInvalidRequest . WithHint ( "Pushed Authorization Requests are enforced for this client but no such request was sent." )
2023-06-19 00:56:02 +00:00
ErrClientAuthorizationUserAccessDenied = fosite . ErrAccessDenied . WithHint ( "The user was denied access to this client." )
2022-10-20 02:16:36 +00:00
)