"""Authorization Backend Exceptions.""" class AuthorizationBackendException(Exception): """General AuthorizationBackend exception.""" pass class UnauthorizedException(AuthorizationBackendException): """UnauthorizedException is raised when an identity is not authorized. This is used in conjunction with `raise_when_unauthorized` flag. """ pass class UnauthenticatedException(AuthorizationBackendException): """AuthorizationBackendException is raised when the OwsPdp connector raises PdpAuthenticationError.""" pass class AttributesException(AuthorizationBackendException): """AttributesException is raised when a resource's attributes could not be fetched.""" pass class AllowedTenantsException(AuthorizationBackendException): """AllowedTenantsException is raised when the allowed tenants cannot be fetched.""" pass class InvalidRequestException(AuthorizationBackendException): """InvalidRequestException is raised when the check_resources request values are invalid.""" pass class PdpAuthenticationError(AuthorizationBackendException): """PdpAuthenticationError is raised when authentication fails (e.g., invalid/missing Authorization header). This exception is always raised regardless of the `raise_when_unauthorized` flag. """ pass