(
self,
description=None,
uri=None,
status_code=None,
state=None,
redirect_uri=None,
redirect_fragment=False,
error=None,
)
| 22 | |
| 23 | class OAuth2Error(AuthlibHTTPError): |
| 24 | def __init__( |
| 25 | self, |
| 26 | description=None, |
| 27 | uri=None, |
| 28 | status_code=None, |
| 29 | state=None, |
| 30 | redirect_uri=None, |
| 31 | redirect_fragment=False, |
| 32 | error=None, |
| 33 | ): |
| 34 | # Human-readable ASCII [USASCII] text providing |
| 35 | # additional information, used to assist the client developer in |
| 36 | # understanding the error that occurred. |
| 37 | # Values for the "error_description" parameter MUST NOT include |
| 38 | # characters outside the set %x20-21 / %x23-5B / %x5D-7E. |
| 39 | if description: |
| 40 | if chars := invalid_error_characters(description): |
| 41 | raise ValueError( |
| 42 | f"Error description contains forbidden characters: {', '.join(chars)}." |
| 43 | ) |
| 44 | |
| 45 | super().__init__(error, description, uri, status_code) |
| 46 | self.state = state |
| 47 | self.redirect_uri = redirect_uri |
| 48 | self.redirect_fragment = redirect_fragment |
| 49 | |
| 50 | def get_body(self): |
| 51 | """Get a list of body.""" |
nothing calls this directly
no test coverage detected