File: errors.py

package info (click to toggle)
python-authlib 1.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,016 kB
  • sloc: python: 26,998; makefile: 53; sh: 14
file content (34 lines) | stat: -rw-r--r-- 999 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from ..base import OAuth2Error

__all__ = [
    "InvalidRequestUriError",
    "InvalidRequestObjectError",
    "RequestNotSupportedError",
    "RequestUriNotSupportedError",
]


class InvalidRequestUriError(OAuth2Error):
    error = "invalid_request_uri"
    description = "The request_uri in the authorization request returns an error or contains invalid data."
    status_code = 400


class InvalidRequestObjectError(OAuth2Error):
    error = "invalid_request_object"
    description = "The request parameter contains an invalid Request Object."
    status_code = 400


class RequestNotSupportedError(OAuth2Error):
    error = "request_not_supported"
    description = (
        "The authorization server does not support the use of the request parameter."
    )
    status_code = 400


class RequestUriNotSupportedError(OAuth2Error):
    error = "request_uri_not_supported"
    description = "The authorization server does not support the use of the request_uri parameter."
    status_code = 400