OIDCAuthorizationCode¶
- pydantic model gafaelfawr.models.oidc.OIDCAuthorizationCode¶
An OpenID Connect authorization code.
Very similar to a
Token
in behavior, but with a different serialization and a different type.- Parameters:
data (
Any
)
Show JSON schema
{ "title": "OIDCAuthorizationCode", "description": "An OpenID Connect authorization code.\n\nVery similar to a `~gafaelfawr.models.token.Token` in behavior, but with a\ndifferent serialization and a different type.", "type": "object", "properties": { "key": { "title": "Key", "type": "string" }, "secret": { "title": "Secret", "type": "string" } } }
- Fields:
- field key: str [Optional]¶
- field secret: str [Optional]¶
- classmethod from_str(code)¶
Parse a serialized token into an
OIDCAuthorizationCode
.- Parameters:
code (
str
) – The serialized code.- Returns:
The decoded
OIDCAuthorizationCode
.- Return type:
- Raises:
InvalidGrantError – Raised if the provided string is not a valid authorization code.