change python client generator for hydra

This commit is contained in:
TuxCoder 2022-02-19 10:22:21 +01:00
parent c15be406ea
commit 4e9fd55093
128 changed files with 16275 additions and 11 deletions

View file

@ -0,0 +1,46 @@
""" Contains all the data models used in inputs/outputs """
from .accept_consent_request import AcceptConsentRequest
from .accept_login_request import AcceptLoginRequest
from .completed_request import CompletedRequest
from .consent_request import ConsentRequest
from .consent_request_session import ConsentRequestSession
from .consent_request_session_access_token import ConsentRequestSessionAccessToken
from .consent_request_session_id_token import ConsentRequestSessionIdToken
from .container_wait_ok_body_error import ContainerWaitOKBodyError
from .flush_inactive_o_auth_2_tokens_request import FlushInactiveOAuth2TokensRequest
from .generic_error import GenericError
from .health_not_ready_status import HealthNotReadyStatus
from .health_not_ready_status_errors import HealthNotReadyStatusErrors
from .health_status import HealthStatus
from .jose_json_web_key_set import JoseJSONWebKeySet
from .json_raw_message import JSONRawMessage
from .json_web_key import JSONWebKey
from .json_web_key_set import JSONWebKeySet
from .json_web_key_set_generator_request import JsonWebKeySetGeneratorRequest
from .login_request import LoginRequest
from .logout_request import LogoutRequest
from .o_auth_2_client import OAuth2Client
from .o_auth_2_token_introspection import OAuth2TokenIntrospection
from .o_auth_2_token_introspection_ext import OAuth2TokenIntrospectionExt
from .oauth_2_token_response import Oauth2TokenResponse
from .open_id_connect_context import OpenIDConnectContext
from .open_id_connect_context_id_token_hint_claims import OpenIDConnectContextIdTokenHintClaims
from .plugin_config import PluginConfig
from .plugin_config_args import PluginConfigArgs
from .plugin_config_interface import PluginConfigInterface
from .plugin_config_linux import PluginConfigLinux
from .plugin_config_network import PluginConfigNetwork
from .plugin_config_rootfs import PluginConfigRootfs
from .plugin_config_user import PluginConfigUser
from .plugin_device import PluginDevice
from .plugin_env import PluginEnv
from .plugin_interface_type import PluginInterfaceType
from .plugin_mount import PluginMount
from .plugin_settings import PluginSettings
from .previous_consent_session import PreviousConsentSession
from .reject_request import RejectRequest
from .userinfo_response import UserinfoResponse
from .version import Version
from .volume_usage_data import VolumeUsageData
from .well_known import WellKnown

View file

@ -0,0 +1,125 @@
import datetime
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from dateutil.parser import isoparse
from ..models.consent_request_session import ConsentRequestSession
from ..types import UNSET, Unset
T = TypeVar("T", bound="AcceptConsentRequest")
@attr.s(auto_attribs=True)
class AcceptConsentRequest:
"""
Attributes:
grant_access_token_audience (Union[Unset, List[str]]):
grant_scope (Union[Unset, List[str]]):
handled_at (Union[Unset, datetime.datetime]):
remember (Union[Unset, bool]): Remember, if set to true, tells ORY Hydra to remember this consent authorization
and reuse it if the same
client asks the same user for the same, or a subset of, scope.
remember_for (Union[Unset, int]): RememberFor sets how long the consent authorization should be remembered for
in seconds. If set to `0`, the
authorization will be remembered indefinitely.
session (Union[Unset, ConsentRequestSession]):
"""
grant_access_token_audience: Union[Unset, List[str]] = UNSET
grant_scope: Union[Unset, List[str]] = UNSET
handled_at: Union[Unset, datetime.datetime] = UNSET
remember: Union[Unset, bool] = UNSET
remember_for: Union[Unset, int] = UNSET
session: Union[Unset, ConsentRequestSession] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
grant_access_token_audience: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_access_token_audience, Unset):
grant_access_token_audience = self.grant_access_token_audience
grant_scope: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_scope, Unset):
grant_scope = self.grant_scope
handled_at: Union[Unset, str] = UNSET
if not isinstance(self.handled_at, Unset):
handled_at = self.handled_at.isoformat()
remember = self.remember
remember_for = self.remember_for
session: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.session, Unset):
session = self.session.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if grant_access_token_audience is not UNSET:
field_dict["grant_access_token_audience"] = grant_access_token_audience
if grant_scope is not UNSET:
field_dict["grant_scope"] = grant_scope
if handled_at is not UNSET:
field_dict["handled_at"] = handled_at
if remember is not UNSET:
field_dict["remember"] = remember
if remember_for is not UNSET:
field_dict["remember_for"] = remember_for
if session is not UNSET:
field_dict["session"] = session
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
grant_access_token_audience = cast(List[str], _d.pop("grant_access_token_audience", UNSET))
grant_scope = cast(List[str], _d.pop("grant_scope", UNSET))
_handled_at = _d.pop("handled_at", UNSET)
handled_at: Union[Unset, datetime.datetime]
if isinstance(_handled_at, Unset):
handled_at = UNSET
else:
handled_at = isoparse(_handled_at)
remember = _d.pop("remember", UNSET)
remember_for = _d.pop("remember_for", UNSET)
_session = _d.pop("session", UNSET)
session: Union[Unset, ConsentRequestSession]
if isinstance(_session, Unset):
session = UNSET
else:
session = ConsentRequestSession.from_dict(_session)
accept_consent_request = cls(
grant_access_token_audience=grant_access_token_audience,
grant_scope=grant_scope,
handled_at=handled_at,
remember=remember,
remember_for=remember_for,
session=session,
)
accept_consent_request.additional_properties = _d
return accept_consent_request
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,135 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.json_raw_message import JSONRawMessage
from ..types import UNSET, Unset
T = TypeVar("T", bound="AcceptLoginRequest")
@attr.s(auto_attribs=True)
class AcceptLoginRequest:
"""
Attributes:
subject (str): Subject is the user ID of the end-user that authenticated.
acr (Union[Unset, str]): ACR sets the Authentication AuthorizationContext Class Reference value for this
authentication session. You can use it
to express that, for example, a user authenticated using two factor authentication.
context (Union[Unset, JSONRawMessage]):
force_subject_identifier (Union[Unset, str]): ForceSubjectIdentifier forces the "pairwise" user ID of the end-
user that authenticated. The "pairwise" user ID refers to the
(Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID
Connect specification. It allows you to set an obfuscated subject ("user") identifier that is unique to the
client.
Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not
change the
sub claim in the OAuth 2.0 Introspection.
Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself
you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in
ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the
client's
configuration).
Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies
that you have to compute this value on every authentication process (probably depending on the client ID or some
other unique value).
If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.
remember (Union[Unset, bool]): Remember, if set to true, tells ORY Hydra to remember this user by telling the
user agent (browser) to store
a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she
will not be asked to log in again.
remember_for (Union[Unset, int]): RememberFor sets how long the authentication should be remembered for in
seconds. If set to `0`, the
authorization will be remembered for the duration of the browser session (using a session cookie).
"""
subject: str
acr: Union[Unset, str] = UNSET
context: Union[Unset, JSONRawMessage] = UNSET
force_subject_identifier: Union[Unset, str] = UNSET
remember: Union[Unset, bool] = UNSET
remember_for: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
subject = self.subject
acr = self.acr
context: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.context, Unset):
context = self.context.to_dict()
force_subject_identifier = self.force_subject_identifier
remember = self.remember
remember_for = self.remember_for
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"subject": subject,
}
)
if acr is not UNSET:
field_dict["acr"] = acr
if context is not UNSET:
field_dict["context"] = context
if force_subject_identifier is not UNSET:
field_dict["force_subject_identifier"] = force_subject_identifier
if remember is not UNSET:
field_dict["remember"] = remember
if remember_for is not UNSET:
field_dict["remember_for"] = remember_for
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
subject = _d.pop("subject")
acr = _d.pop("acr", UNSET)
_context = _d.pop("context", UNSET)
context: Union[Unset, JSONRawMessage]
if isinstance(_context, Unset):
context = UNSET
else:
context = JSONRawMessage.from_dict(_context)
force_subject_identifier = _d.pop("force_subject_identifier", UNSET)
remember = _d.pop("remember", UNSET)
remember_for = _d.pop("remember_for", UNSET)
accept_login_request = cls(
subject=subject,
acr=acr,
context=context,
force_subject_identifier=force_subject_identifier,
remember=remember,
remember_for=remember_for,
)
accept_login_request.additional_properties = _d
return accept_login_request
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,58 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="CompletedRequest")
@attr.s(auto_attribs=True)
class CompletedRequest:
"""
Attributes:
redirect_to (str): RedirectURL is the URL which you should redirect the user to once the authentication process
is completed.
"""
redirect_to: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
redirect_to = self.redirect_to
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"redirect_to": redirect_to,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
redirect_to = _d.pop("redirect_to")
completed_request = cls(
redirect_to=redirect_to,
)
completed_request.additional_properties = _d
return completed_request
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,200 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.json_raw_message import JSONRawMessage
from ..models.o_auth_2_client import OAuth2Client
from ..models.open_id_connect_context import OpenIDConnectContext
from ..types import UNSET, Unset
T = TypeVar("T", bound="ConsentRequest")
@attr.s(auto_attribs=True)
class ConsentRequest:
"""
Attributes:
challenge (str): ID is the identifier ("authorization challenge") of the consent authorization request. It is
used to
identify the session.
acr (Union[Unset, str]): ACR represents the Authentication AuthorizationContext Class Reference value for this
authentication session. You can use it
to express that, for example, a user authenticated using two factor authentication.
client (Union[Unset, OAuth2Client]):
context (Union[Unset, JSONRawMessage]):
login_challenge (Union[Unset, str]): LoginChallenge is the login challenge this consent challenge belongs to. It
can be used to associate
a login and consent request in the login & consent app.
login_session_id (Union[Unset, str]): LoginSessionID is the login session ID. If the user-agent reuses a login
session (via cookie / remember flag)
this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember
is false)
this will be a new random value. This value is used as the "sid" parameter in the ID Token and in OIDC
Front-/Back-
channel logout. It's value can generally be used to associate consecutive login requests by a certain user.
oidc_context (Union[Unset, OpenIDConnectContext]):
request_url (Union[Unset, str]): RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth
2.0 client. It is the URL which
initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but
might come in handy if you want to deal with additional request parameters.
requested_access_token_audience (Union[Unset, List[str]]):
requested_scope (Union[Unset, List[str]]):
skip (Union[Unset, bool]): Skip, if true, implies that the client has requested the same scopes from the same
user previously.
If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the
consent request using the usual API call.
subject (Union[Unset, str]): Subject is the user ID of the end-user that authenticated. Now, that end user needs
to grant or deny the scope
requested by the OAuth 2.0 client.
"""
challenge: str
acr: Union[Unset, str] = UNSET
client: Union[Unset, OAuth2Client] = UNSET
context: Union[Unset, JSONRawMessage] = UNSET
login_challenge: Union[Unset, str] = UNSET
login_session_id: Union[Unset, str] = UNSET
oidc_context: Union[Unset, OpenIDConnectContext] = UNSET
request_url: Union[Unset, str] = UNSET
requested_access_token_audience: Union[Unset, List[str]] = UNSET
requested_scope: Union[Unset, List[str]] = UNSET
skip: Union[Unset, bool] = UNSET
subject: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
challenge = self.challenge
acr = self.acr
client: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.client, Unset):
client = self.client.to_dict()
context: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.context, Unset):
context = self.context.to_dict()
login_challenge = self.login_challenge
login_session_id = self.login_session_id
oidc_context: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.oidc_context, Unset):
oidc_context = self.oidc_context.to_dict()
request_url = self.request_url
requested_access_token_audience: Union[Unset, List[str]] = UNSET
if not isinstance(self.requested_access_token_audience, Unset):
requested_access_token_audience = self.requested_access_token_audience
requested_scope: Union[Unset, List[str]] = UNSET
if not isinstance(self.requested_scope, Unset):
requested_scope = self.requested_scope
skip = self.skip
subject = self.subject
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"challenge": challenge,
}
)
if acr is not UNSET:
field_dict["acr"] = acr
if client is not UNSET:
field_dict["client"] = client
if context is not UNSET:
field_dict["context"] = context
if login_challenge is not UNSET:
field_dict["login_challenge"] = login_challenge
if login_session_id is not UNSET:
field_dict["login_session_id"] = login_session_id
if oidc_context is not UNSET:
field_dict["oidc_context"] = oidc_context
if request_url is not UNSET:
field_dict["request_url"] = request_url
if requested_access_token_audience is not UNSET:
field_dict["requested_access_token_audience"] = requested_access_token_audience
if requested_scope is not UNSET:
field_dict["requested_scope"] = requested_scope
if skip is not UNSET:
field_dict["skip"] = skip
if subject is not UNSET:
field_dict["subject"] = subject
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
challenge = _d.pop("challenge")
acr = _d.pop("acr", UNSET)
_client = _d.pop("client", UNSET)
client: Union[Unset, OAuth2Client]
if isinstance(_client, Unset):
client = UNSET
else:
client = OAuth2Client.from_dict(_client)
_context = _d.pop("context", UNSET)
context: Union[Unset, JSONRawMessage]
if isinstance(_context, Unset):
context = UNSET
else:
context = JSONRawMessage.from_dict(_context)
login_challenge = _d.pop("login_challenge", UNSET)
login_session_id = _d.pop("login_session_id", UNSET)
_oidc_context = _d.pop("oidc_context", UNSET)
oidc_context: Union[Unset, OpenIDConnectContext]
if isinstance(_oidc_context, Unset):
oidc_context = UNSET
else:
oidc_context = OpenIDConnectContext.from_dict(_oidc_context)
request_url = _d.pop("request_url", UNSET)
requested_access_token_audience = cast(List[str], _d.pop("requested_access_token_audience", UNSET))
requested_scope = cast(List[str], _d.pop("requested_scope", UNSET))
skip = _d.pop("skip", UNSET)
subject = _d.pop("subject", UNSET)
consent_request = cls(
challenge=challenge,
acr=acr,
client=client,
context=context,
login_challenge=login_challenge,
login_session_id=login_session_id,
oidc_context=oidc_context,
request_url=request_url,
requested_access_token_audience=requested_access_token_audience,
requested_scope=requested_scope,
skip=skip,
subject=subject,
)
consent_request.additional_properties = _d
return consent_request
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,89 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.consent_request_session_access_token import ConsentRequestSessionAccessToken
from ..models.consent_request_session_id_token import ConsentRequestSessionIdToken
from ..types import UNSET, Unset
T = TypeVar("T", bound="ConsentRequestSession")
@attr.s(auto_attribs=True)
class ConsentRequestSession:
"""
Attributes:
access_token (Union[Unset, ConsentRequestSessionAccessToken]): AccessToken sets session data for the access and
refresh token, as well as any future tokens issued by the
refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge
Introspection.
If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties
can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!
id_token (Union[Unset, ConsentRequestSessionIdToken]): IDToken sets session data for the OpenID Connect ID
token. Keep in mind that the session'id payloads are readable
by anyone that has access to the ID Challenge. Use with care!
"""
access_token: Union[Unset, ConsentRequestSessionAccessToken] = UNSET
id_token: Union[Unset, ConsentRequestSessionIdToken] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
access_token: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.access_token, Unset):
access_token = self.access_token.to_dict()
id_token: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.id_token, Unset):
id_token = self.id_token.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if access_token is not UNSET:
field_dict["access_token"] = access_token
if id_token is not UNSET:
field_dict["id_token"] = id_token
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
_access_token = _d.pop("access_token", UNSET)
access_token: Union[Unset, ConsentRequestSessionAccessToken]
if isinstance(_access_token, Unset):
access_token = UNSET
else:
access_token = ConsentRequestSessionAccessToken.from_dict(_access_token)
_id_token = _d.pop("id_token", UNSET)
id_token: Union[Unset, ConsentRequestSessionIdToken]
if isinstance(_id_token, Unset):
id_token = UNSET
else:
id_token = ConsentRequestSessionIdToken.from_dict(_id_token)
consent_request_session = cls(
access_token=access_token,
id_token=id_token,
)
consent_request_session.additional_properties = _d
return consent_request_session
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,49 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="ConsentRequestSessionAccessToken")
@attr.s(auto_attribs=True)
class ConsentRequestSessionAccessToken:
"""AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the
refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection.
If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties
can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
consent_request_session_access_token = cls()
consent_request_session_access_token.additional_properties = _d
return consent_request_session_access_token
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,47 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="ConsentRequestSessionIdToken")
@attr.s(auto_attribs=True)
class ConsentRequestSessionIdToken:
"""IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable
by anyone that has access to the ID Challenge. Use with care!
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
consent_request_session_id_token = cls()
consent_request_session_id_token.additional_properties = _d
return consent_request_session_id_token
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,58 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="ContainerWaitOKBodyError")
@attr.s(auto_attribs=True)
class ContainerWaitOKBodyError:
"""ContainerWaitOKBodyError container waiting error, if any
Attributes:
message (Union[Unset, str]): Details of an error
"""
message: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
message = self.message
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if message is not UNSET:
field_dict["Message"] = message
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
message = _d.pop("Message", UNSET)
container_wait_ok_body_error = cls(
message=message,
)
container_wait_ok_body_error.additional_properties = _d
return container_wait_ok_body_error
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,68 @@
import datetime
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from dateutil.parser import isoparse
from ..types import UNSET, Unset
T = TypeVar("T", bound="FlushInactiveOAuth2TokensRequest")
@attr.s(auto_attribs=True)
class FlushInactiveOAuth2TokensRequest:
"""
Attributes:
not_after (Union[Unset, datetime.datetime]): NotAfter sets after which point tokens should not be flushed. This
is useful when you want to keep a history
of recently issued tokens for auditing.
"""
not_after: Union[Unset, datetime.datetime] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
not_after: Union[Unset, str] = UNSET
if not isinstance(self.not_after, Unset):
not_after = self.not_after.isoformat()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if not_after is not UNSET:
field_dict["notAfter"] = not_after
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
_not_after = _d.pop("notAfter", UNSET)
not_after: Union[Unset, datetime.datetime]
if isinstance(_not_after, Unset):
not_after = UNSET
else:
not_after = isoparse(_not_after)
flush_inactive_o_auth_2_tokens_request = cls(
not_after=not_after,
)
flush_inactive_o_auth_2_tokens_request.additional_properties = _d
return flush_inactive_o_auth_2_tokens_request
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,86 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="GenericError")
@attr.s(auto_attribs=True)
class GenericError:
"""Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.
Attributes:
error (str): Name is the error name. Example: The requested resource could not be found.
debug (Union[Unset, str]): Debug contains debug information. This is usually not available and has to be
enabled. Example: The database adapter was unable to find the element.
error_description (Union[Unset, str]): Description contains further information on the nature of the error.
Example: Object with ID 12345 does not exist.
status_code (Union[Unset, int]): Code represents the error status code (404, 403, 401, ...). Example: 404.
"""
error: str
debug: Union[Unset, str] = UNSET
error_description: Union[Unset, str] = UNSET
status_code: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
error = self.error
debug = self.debug
error_description = self.error_description
status_code = self.status_code
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"error": error,
}
)
if debug is not UNSET:
field_dict["debug"] = debug
if error_description is not UNSET:
field_dict["error_description"] = error_description
if status_code is not UNSET:
field_dict["status_code"] = status_code
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
error = _d.pop("error")
debug = _d.pop("debug", UNSET)
error_description = _d.pop("error_description", UNSET)
status_code = _d.pop("status_code", UNSET)
generic_error = cls(
error=error,
debug=debug,
error_description=error_description,
status_code=status_code,
)
generic_error.additional_properties = _d
return generic_error
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,66 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.health_not_ready_status_errors import HealthNotReadyStatusErrors
from ..types import UNSET, Unset
T = TypeVar("T", bound="HealthNotReadyStatus")
@attr.s(auto_attribs=True)
class HealthNotReadyStatus:
"""
Attributes:
errors (Union[Unset, HealthNotReadyStatusErrors]): Errors contains a list of errors that caused the not ready
status.
"""
errors: Union[Unset, HealthNotReadyStatusErrors] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
errors: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.errors, Unset):
errors = self.errors.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if errors is not UNSET:
field_dict["errors"] = errors
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
_errors = _d.pop("errors", UNSET)
errors: Union[Unset, HealthNotReadyStatusErrors]
if isinstance(_errors, Unset):
errors = UNSET
else:
errors = HealthNotReadyStatusErrors.from_dict(_errors)
health_not_ready_status = cls(
errors=errors,
)
health_not_ready_status.additional_properties = _d
return health_not_ready_status
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,44 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="HealthNotReadyStatusErrors")
@attr.s(auto_attribs=True)
class HealthNotReadyStatusErrors:
"""Errors contains a list of errors that caused the not ready status."""
additional_properties: Dict[str, str] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
health_not_ready_status_errors = cls()
health_not_ready_status_errors.additional_properties = _d
return health_not_ready_status_errors
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> str:
return self.additional_properties[key]
def __setitem__(self, key: str, value: str) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,57 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="HealthStatus")
@attr.s(auto_attribs=True)
class HealthStatus:
"""
Attributes:
status (Union[Unset, str]): Status always contains "ok".
"""
status: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
status = self.status
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if status is not UNSET:
field_dict["status"] = status
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
status = _d.pop("status", UNSET)
health_status = cls(
status=status,
)
health_status.additional_properties = _d
return health_status
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,44 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="JoseJSONWebKeySet")
@attr.s(auto_attribs=True)
class JoseJSONWebKeySet:
""" """
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
jose_json_web_key_set = cls()
jose_json_web_key_set.additional_properties = _d
return jose_json_web_key_set
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,44 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="JSONRawMessage")
@attr.s(auto_attribs=True)
class JSONRawMessage:
""" """
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
json_raw_message = cls()
json_raw_message.additional_properties = _d
return json_raw_message
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,237 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="JSONWebKey")
@attr.s(auto_attribs=True)
class JSONWebKey:
"""It is important that this model object is named JSONWebKey for
"swagger generate spec" to generate only on definition of a
JSONWebKey.
Attributes:
alg (str): The "alg" (algorithm) parameter identifies the algorithm intended for
use with the key. The values used should either be registered in the
IANA "JSON Web Signature and Encryption Algorithms" registry
established by [JWA] or be a value that contains a Collision-
Resistant Name. Example: RS256.
kid (str): The "kid" (key ID) parameter is used to match a specific key. This
is used, for instance, to choose among a set of keys within a JWK Set
during key rollover. The structure of the "kid" value is
unspecified. When "kid" values are used within a JWK Set, different
keys within the JWK Set SHOULD use distinct "kid" values. (One
example in which different keys might use the same "kid" value is if
they have different "kty" (key type) values but are considered to be
equivalent alternatives by the application using them.) The "kid"
value is a case-sensitive string. Example: 1603dfe0af8f4596.
kty (str): The "kty" (key type) parameter identifies the cryptographic algorithm
family used with the key, such as "RSA" or "EC". "kty" values should
either be registered in the IANA "JSON Web Key Types" registry
established by [JWA] or be a value that contains a Collision-
Resistant Name. The "kty" value is a case-sensitive string. Example: RSA.
use (str): Use ("public key use") identifies the intended use of
the public key. The "use" parameter is employed to indicate whether
a public key is used for encrypting data or verifying the signature
on data. Values are commonly "sig" (signature) or "enc" (encryption). Example: sig.
crv (Union[Unset, str]): Example: P-256.
d (Union[Unset, str]): Example:
T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-
TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-
xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS
4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-
ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpg
NKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYV
WFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE.
dp (Union[Unset, str]): Example: G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ
4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0.
dq (Union[Unset, str]): Example: s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF
7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk.
e (Union[Unset, str]): Example: AQAB.
k (Union[Unset, str]): Example: GawgguFyGrWKav7AX4VKUg.
n (Union[Unset, str]): Example: vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4J
zruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJL
BWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yF
p_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUX
t23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCF
DMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-
KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0.
p (Union[Unset, str]): Example: 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2
i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmS
eMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0
Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ.
q (Union[Unset, str]): Example: 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-
ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-
uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y
0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ.
qi (Union[Unset, str]): Example: GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-
Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU.
x (Union[Unset, str]): Example: f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU.
x5c (Union[Unset, List[str]]): The "x5c" (X.509 certificate chain) parameter contains a chain of one
or more PKIX certificates [RFC5280]. The certificate chain is
represented as a JSON array of certificate value strings. Each
string in the array is a base64-encoded (Section 4 of [RFC4648] --
not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.
The PKIX certificate containing the key value MUST be the first
certificate.
y (Union[Unset, str]): Example: x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0.
"""
alg: str
kid: str
kty: str
use: str
crv: Union[Unset, str] = UNSET
d: Union[Unset, str] = UNSET
dp: Union[Unset, str] = UNSET
dq: Union[Unset, str] = UNSET
e: Union[Unset, str] = UNSET
k: Union[Unset, str] = UNSET
n: Union[Unset, str] = UNSET
p: Union[Unset, str] = UNSET
q: Union[Unset, str] = UNSET
qi: Union[Unset, str] = UNSET
x: Union[Unset, str] = UNSET
x5c: Union[Unset, List[str]] = UNSET
y: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
alg = self.alg
kid = self.kid
kty = self.kty
use = self.use
crv = self.crv
d = self.d
dp = self.dp
dq = self.dq
e = self.e
k = self.k
n = self.n
p = self.p
q = self.q
qi = self.qi
x = self.x
x5c: Union[Unset, List[str]] = UNSET
if not isinstance(self.x5c, Unset):
x5c = self.x5c
y = self.y
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"alg": alg,
"kid": kid,
"kty": kty,
"use": use,
}
)
if crv is not UNSET:
field_dict["crv"] = crv
if d is not UNSET:
field_dict["d"] = d
if dp is not UNSET:
field_dict["dp"] = dp
if dq is not UNSET:
field_dict["dq"] = dq
if e is not UNSET:
field_dict["e"] = e
if k is not UNSET:
field_dict["k"] = k
if n is not UNSET:
field_dict["n"] = n
if p is not UNSET:
field_dict["p"] = p
if q is not UNSET:
field_dict["q"] = q
if qi is not UNSET:
field_dict["qi"] = qi
if x is not UNSET:
field_dict["x"] = x
if x5c is not UNSET:
field_dict["x5c"] = x5c
if y is not UNSET:
field_dict["y"] = y
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
alg = _d.pop("alg")
kid = _d.pop("kid")
kty = _d.pop("kty")
use = _d.pop("use")
crv = _d.pop("crv", UNSET)
d = _d.pop("d", UNSET)
dp = _d.pop("dp", UNSET)
dq = _d.pop("dq", UNSET)
e = _d.pop("e", UNSET)
k = _d.pop("k", UNSET)
n = _d.pop("n", UNSET)
p = _d.pop("p", UNSET)
q = _d.pop("q", UNSET)
qi = _d.pop("qi", UNSET)
x = _d.pop("x", UNSET)
x5c = cast(List[str], _d.pop("x5c", UNSET))
y = _d.pop("y", UNSET)
json_web_key = cls(
alg=alg,
kid=kid,
kty=kty,
use=use,
crv=crv,
d=d,
dp=dp,
dq=dq,
e=e,
k=k,
n=n,
p=p,
q=q,
qi=qi,
x=x,
x5c=x5c,
y=y,
)
json_web_key.additional_properties = _d
return json_web_key
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,78 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.json_web_key import JSONWebKey
from ..types import UNSET, Unset
T = TypeVar("T", bound="JSONWebKeySet")
@attr.s(auto_attribs=True)
class JSONWebKeySet:
"""It is important that this model object is named JSONWebKeySet for
"swagger generate spec" to generate only on definition of a
JSONWebKeySet. Since one with the same name is previously defined as
client.Client.JSONWebKeys and this one is last, this one will be
effectively written in the swagger spec.
Attributes:
keys (Union[Unset, List[JSONWebKey]]): The value of the "keys" parameter is an array of JWK values. By
default, the order of the JWK values within the array does not imply
an order of preference among them, although applications of JWK Sets
can choose to assign a meaning to the order for their purposes, if
desired.
"""
keys: Union[Unset, List[JSONWebKey]] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
keys: Union[Unset, List[Dict[str, Any]]] = UNSET
if not isinstance(self.keys, Unset):
keys = []
for keys_item_data in self.keys:
keys_item = keys_item_data.to_dict()
keys.append(keys_item)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if keys is not UNSET:
field_dict["keys"] = keys
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
keys = []
_keys = _d.pop("keys", UNSET)
for keys_item_data in _keys or []:
keys_item = JSONWebKey.from_dict(keys_item_data)
keys.append(keys_item)
json_web_key_set = cls(
keys=keys,
)
json_web_key_set.additional_properties = _d
return json_web_key_set
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,74 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="JsonWebKeySetGeneratorRequest")
@attr.s(auto_attribs=True)
class JsonWebKeySetGeneratorRequest:
"""
Attributes:
alg (str): The algorithm to be used for creating the key. Supports "RS256", "ES512", "HS512", and "HS256"
kid (str): The kid of the key to be created
use (str): The "use" (public key use) parameter identifies the intended use of
the public key. The "use" parameter is employed to indicate whether
a public key is used for encrypting data or verifying the signature
on data. Valid values are "enc" and "sig".
"""
alg: str
kid: str
use: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
alg = self.alg
kid = self.kid
use = self.use
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"alg": alg,
"kid": kid,
"use": use,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
alg = _d.pop("alg")
kid = _d.pop("kid")
use = _d.pop("use")
json_web_key_set_generator_request = cls(
alg=alg,
kid=kid,
use=use,
)
json_web_key_set_generator_request.additional_properties = _d
return json_web_key_set_generator_request
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,147 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.o_auth_2_client import OAuth2Client
from ..models.open_id_connect_context import OpenIDConnectContext
from ..types import UNSET, Unset
T = TypeVar("T", bound="LoginRequest")
@attr.s(auto_attribs=True)
class LoginRequest:
"""
Attributes:
challenge (str): ID is the identifier ("login challenge") of the login request. It is used to
identify the session.
client (OAuth2Client):
request_url (str): RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It
is the URL which
initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but
might come in handy if you want to deal with additional request parameters.
requested_access_token_audience (List[str]):
requested_scope (List[str]):
skip (bool): Skip, if true, implies that the client has requested the same scopes from the same user previously.
If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect
URL.
This feature allows you to update / set session information.
subject (str): Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or
deny the scope
requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type
when accepting the login request, or the request will fail.
oidc_context (Union[Unset, OpenIDConnectContext]):
session_id (Union[Unset, str]): SessionID is the login session ID. If the user-agent reuses a login session (via
cookie / remember flag)
this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember
is false)
this will be a new random value. This value is used as the "sid" parameter in the ID Token and in OIDC
Front-/Back-
channel logout. It's value can generally be used to associate consecutive login requests by a certain user.
"""
challenge: str
client: OAuth2Client
request_url: str
requested_access_token_audience: List[str]
requested_scope: List[str]
skip: bool
subject: str
oidc_context: Union[Unset, OpenIDConnectContext] = UNSET
session_id: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
challenge = self.challenge
client = self.client.to_dict()
request_url = self.request_url
requested_access_token_audience = self.requested_access_token_audience
requested_scope = self.requested_scope
skip = self.skip
subject = self.subject
oidc_context: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.oidc_context, Unset):
oidc_context = self.oidc_context.to_dict()
session_id = self.session_id
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"challenge": challenge,
"client": client,
"request_url": request_url,
"requested_access_token_audience": requested_access_token_audience,
"requested_scope": requested_scope,
"skip": skip,
"subject": subject,
}
)
if oidc_context is not UNSET:
field_dict["oidc_context"] = oidc_context
if session_id is not UNSET:
field_dict["session_id"] = session_id
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
challenge = _d.pop("challenge")
client = OAuth2Client.from_dict(_d.pop("client"))
request_url = _d.pop("request_url")
requested_access_token_audience = cast(List[str], _d.pop("requested_access_token_audience"))
requested_scope = cast(List[str], _d.pop("requested_scope"))
skip = _d.pop("skip")
subject = _d.pop("subject")
_oidc_context = _d.pop("oidc_context", UNSET)
oidc_context: Union[Unset, OpenIDConnectContext]
if isinstance(_oidc_context, Unset):
oidc_context = UNSET
else:
oidc_context = OpenIDConnectContext.from_dict(_oidc_context)
session_id = _d.pop("session_id", UNSET)
login_request = cls(
challenge=challenge,
client=client,
request_url=request_url,
requested_access_token_audience=requested_access_token_audience,
requested_scope=requested_scope,
skip=skip,
subject=subject,
oidc_context=oidc_context,
session_id=session_id,
)
login_request.additional_properties = _d
return login_request
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,82 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="LogoutRequest")
@attr.s(auto_attribs=True)
class LogoutRequest:
"""
Attributes:
request_url (Union[Unset, str]): RequestURL is the original Logout URL requested.
rp_initiated (Union[Unset, bool]): RPInitiated is set to true if the request was initiated by a Relying Party
(RP), also known as an OAuth 2.0 Client.
sid (Union[Unset, str]): SessionID is the login session ID that was requested to log out.
subject (Union[Unset, str]): Subject is the user for whom the logout was request.
"""
request_url: Union[Unset, str] = UNSET
rp_initiated: Union[Unset, bool] = UNSET
sid: Union[Unset, str] = UNSET
subject: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
request_url = self.request_url
rp_initiated = self.rp_initiated
sid = self.sid
subject = self.subject
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if request_url is not UNSET:
field_dict["request_url"] = request_url
if rp_initiated is not UNSET:
field_dict["rp_initiated"] = rp_initiated
if sid is not UNSET:
field_dict["sid"] = sid
if subject is not UNSET:
field_dict["subject"] = subject
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
request_url = _d.pop("request_url", UNSET)
rp_initiated = _d.pop("rp_initiated", UNSET)
sid = _d.pop("sid", UNSET)
subject = _d.pop("subject", UNSET)
logout_request = cls(
request_url=request_url,
rp_initiated=rp_initiated,
sid=sid,
subject=subject,
)
logout_request.additional_properties = _d
return logout_request
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,426 @@
import datetime
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from dateutil.parser import isoparse
from ..models.jose_json_web_key_set import JoseJSONWebKeySet
from ..models.json_raw_message import JSONRawMessage
from ..types import UNSET, Unset
T = TypeVar("T", bound="OAuth2Client")
@attr.s(auto_attribs=True)
class OAuth2Client:
"""
Attributes:
allowed_cors_origins (Union[Unset, List[str]]):
audience (Union[Unset, List[str]]):
backchannel_logout_session_required (Union[Unset, bool]): Boolean value specifying whether the RP requires that
a sid (session ID) Claim be included in the Logout
Token to identify the RP session with the OP when the backchannel_logout_uri is used.
If omitted, the default value is false.
backchannel_logout_uri (Union[Unset, str]): RP URL that will cause the RP to log itself out when sent a Logout
Token by the OP.
client_id (Union[Unset, str]): ID is the id for this client.
client_name (Union[Unset, str]): Name is the human-readable string name of the client to be presented to the
end-user during authorization.
client_secret (Union[Unset, str]): Secret is the client's secret. The secret will be included in the create
request as cleartext, and then
never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users
that they need to write the secret down as it will not be made available again.
client_secret_expires_at (Union[Unset, int]): SecretExpiresAt is an integer holding the time at which the client
secret will expire or 0 if it will not expire. The time is
represented as the number of seconds from 1970-01-01T00:00:00Z as
measured in UTC until the date/time of expiration.
This feature is currently not supported and it's value will always
be set to 0.
client_uri (Union[Unset, str]): ClientURI is an URL string of a web page providing information about the client.
If present, the server SHOULD display this URL to the end-user in
a clickable fashion.
contacts (Union[Unset, List[str]]):
created_at (Union[Unset, datetime.datetime]): CreatedAt returns the timestamp of the client's creation.
frontchannel_logout_session_required (Union[Unset, bool]): Boolean value specifying whether the RP requires that
iss (issuer) and sid (session ID) query parameters be
included to identify the RP session with the OP when the frontchannel_logout_uri is used.
If omitted, the default value is false.
frontchannel_logout_uri (Union[Unset, str]): RP URL that will cause the RP to log itself out when rendered in an
iframe by the OP. An iss (issuer) query
parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the
request and to determine which of the potentially multiple sessions is to be logged out; if either is
included, both MUST be.
grant_types (Union[Unset, List[str]]):
jwks (Union[Unset, JoseJSONWebKeySet]):
jwks_uri (Union[Unset, str]): URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests
to the Server, it contains
the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the
Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing
and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the
referenced
JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both
signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used
to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST
match those in the certificate.
logo_uri (Union[Unset, str]): LogoURI is an URL string that references a logo for the client.
metadata (Union[Unset, JSONRawMessage]):
owner (Union[Unset, str]): Owner is a string identifying the owner of the OAuth 2.0 Client.
policy_uri (Union[Unset, str]): PolicyURI is a URL string that points to a human-readable privacy policy
document
that describes how the deployment organization collects, uses,
retains, and discloses personal data.
post_logout_redirect_uris (Union[Unset, List[str]]):
redirect_uris (Union[Unset, List[str]]):
request_object_signing_alg (Union[Unset, str]): JWS [JWS] alg algorithm [JWA] that MUST be used for signing
Request Objects sent to the OP. All Request Objects
from this Client MUST be rejected, if not signed with this algorithm.
request_uris (Union[Unset, List[str]]):
response_types (Union[Unset, List[str]]):
scope (Union[Unset, str]): Scope is a string containing a space-separated list of scope values (as
described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client
can use when requesting access tokens.
sector_identifier_uri (Union[Unset, str]): URL using the https scheme to be used in calculating Pseudonymous
Identifiers by the OP. The URL references a
file with a single JSON array of redirect_uri values.
subject_type (Union[Unset, str]): SubjectType requested for responses to this Client. The
subject_types_supported Discovery parameter contains a
list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.
token_endpoint_auth_method (Union[Unset, str]): Requested Client Authentication method for the Token Endpoint.
The options are client_secret_post,
client_secret_basic, private_key_jwt, and none.
token_endpoint_auth_signing_alg (Union[Unset, str]): Requested Client Authentication signing algorithm for the
Token Endpoint.
tos_uri (Union[Unset, str]): TermsOfServiceURI is a URL string that points to a human-readable terms of service
document for the client that describes a contractual relationship
between the end-user and the client that the end-user accepts when
authorizing the client.
updated_at (Union[Unset, datetime.datetime]): UpdatedAt returns the timestamp of the last update.
userinfo_signed_response_alg (Union[Unset, str]): JWS alg algorithm [JWA] REQUIRED for signing UserInfo
Responses. If this is specified, the response will be JWT
[JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the
Claims
as a UTF-8 encoded JSON object using the application/json content-type.
"""
allowed_cors_origins: Union[Unset, List[str]] = UNSET
audience: Union[Unset, List[str]] = UNSET
backchannel_logout_session_required: Union[Unset, bool] = UNSET
backchannel_logout_uri: Union[Unset, str] = UNSET
client_id: Union[Unset, str] = UNSET
client_name: Union[Unset, str] = UNSET
client_secret: Union[Unset, str] = UNSET
client_secret_expires_at: Union[Unset, int] = UNSET
client_uri: Union[Unset, str] = UNSET
contacts: Union[Unset, List[str]] = UNSET
created_at: Union[Unset, datetime.datetime] = UNSET
frontchannel_logout_session_required: Union[Unset, bool] = UNSET
frontchannel_logout_uri: Union[Unset, str] = UNSET
grant_types: Union[Unset, List[str]] = UNSET
jwks: Union[Unset, JoseJSONWebKeySet] = UNSET
jwks_uri: Union[Unset, str] = UNSET
logo_uri: Union[Unset, str] = UNSET
metadata: Union[Unset, JSONRawMessage] = UNSET
owner: Union[Unset, str] = UNSET
policy_uri: Union[Unset, str] = UNSET
post_logout_redirect_uris: Union[Unset, List[str]] = UNSET
redirect_uris: Union[Unset, List[str]] = UNSET
request_object_signing_alg: Union[Unset, str] = UNSET
request_uris: Union[Unset, List[str]] = UNSET
response_types: Union[Unset, List[str]] = UNSET
scope: Union[Unset, str] = UNSET
sector_identifier_uri: Union[Unset, str] = UNSET
subject_type: Union[Unset, str] = UNSET
token_endpoint_auth_method: Union[Unset, str] = UNSET
token_endpoint_auth_signing_alg: Union[Unset, str] = UNSET
tos_uri: Union[Unset, str] = UNSET
updated_at: Union[Unset, datetime.datetime] = UNSET
userinfo_signed_response_alg: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
allowed_cors_origins: Union[Unset, List[str]] = UNSET
if not isinstance(self.allowed_cors_origins, Unset):
allowed_cors_origins = self.allowed_cors_origins
audience: Union[Unset, List[str]] = UNSET
if not isinstance(self.audience, Unset):
audience = self.audience
backchannel_logout_session_required = self.backchannel_logout_session_required
backchannel_logout_uri = self.backchannel_logout_uri
client_id = self.client_id
client_name = self.client_name
client_secret = self.client_secret
client_secret_expires_at = self.client_secret_expires_at
client_uri = self.client_uri
contacts: Union[Unset, List[str]] = UNSET
if not isinstance(self.contacts, Unset):
contacts = self.contacts
created_at: Union[Unset, str] = UNSET
if not isinstance(self.created_at, Unset):
created_at = self.created_at.isoformat()
frontchannel_logout_session_required = self.frontchannel_logout_session_required
frontchannel_logout_uri = self.frontchannel_logout_uri
grant_types: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_types, Unset):
grant_types = self.grant_types
jwks: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.jwks, Unset):
jwks = self.jwks.to_dict()
jwks_uri = self.jwks_uri
logo_uri = self.logo_uri
metadata: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.metadata, Unset):
metadata = self.metadata.to_dict()
owner = self.owner
policy_uri = self.policy_uri
post_logout_redirect_uris: Union[Unset, List[str]] = UNSET
if not isinstance(self.post_logout_redirect_uris, Unset):
post_logout_redirect_uris = self.post_logout_redirect_uris
redirect_uris: Union[Unset, List[str]] = UNSET
if not isinstance(self.redirect_uris, Unset):
redirect_uris = self.redirect_uris
request_object_signing_alg = self.request_object_signing_alg
request_uris: Union[Unset, List[str]] = UNSET
if not isinstance(self.request_uris, Unset):
request_uris = self.request_uris
response_types: Union[Unset, List[str]] = UNSET
if not isinstance(self.response_types, Unset):
response_types = self.response_types
scope = self.scope
sector_identifier_uri = self.sector_identifier_uri
subject_type = self.subject_type
token_endpoint_auth_method = self.token_endpoint_auth_method
token_endpoint_auth_signing_alg = self.token_endpoint_auth_signing_alg
tos_uri = self.tos_uri
updated_at: Union[Unset, str] = UNSET
if not isinstance(self.updated_at, Unset):
updated_at = self.updated_at.isoformat()
userinfo_signed_response_alg = self.userinfo_signed_response_alg
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if allowed_cors_origins is not UNSET:
field_dict["allowed_cors_origins"] = allowed_cors_origins
if audience is not UNSET:
field_dict["audience"] = audience
if backchannel_logout_session_required is not UNSET:
field_dict["backchannel_logout_session_required"] = backchannel_logout_session_required
if backchannel_logout_uri is not UNSET:
field_dict["backchannel_logout_uri"] = backchannel_logout_uri
if client_id is not UNSET:
field_dict["client_id"] = client_id
if client_name is not UNSET:
field_dict["client_name"] = client_name
if client_secret is not UNSET:
field_dict["client_secret"] = client_secret
if client_secret_expires_at is not UNSET:
field_dict["client_secret_expires_at"] = client_secret_expires_at
if client_uri is not UNSET:
field_dict["client_uri"] = client_uri
if contacts is not UNSET:
field_dict["contacts"] = contacts
if created_at is not UNSET:
field_dict["created_at"] = created_at
if frontchannel_logout_session_required is not UNSET:
field_dict["frontchannel_logout_session_required"] = frontchannel_logout_session_required
if frontchannel_logout_uri is not UNSET:
field_dict["frontchannel_logout_uri"] = frontchannel_logout_uri
if grant_types is not UNSET:
field_dict["grant_types"] = grant_types
if jwks is not UNSET:
field_dict["jwks"] = jwks
if jwks_uri is not UNSET:
field_dict["jwks_uri"] = jwks_uri
if logo_uri is not UNSET:
field_dict["logo_uri"] = logo_uri
if metadata is not UNSET:
field_dict["metadata"] = metadata
if owner is not UNSET:
field_dict["owner"] = owner
if policy_uri is not UNSET:
field_dict["policy_uri"] = policy_uri
if post_logout_redirect_uris is not UNSET:
field_dict["post_logout_redirect_uris"] = post_logout_redirect_uris
if redirect_uris is not UNSET:
field_dict["redirect_uris"] = redirect_uris
if request_object_signing_alg is not UNSET:
field_dict["request_object_signing_alg"] = request_object_signing_alg
if request_uris is not UNSET:
field_dict["request_uris"] = request_uris
if response_types is not UNSET:
field_dict["response_types"] = response_types
if scope is not UNSET:
field_dict["scope"] = scope
if sector_identifier_uri is not UNSET:
field_dict["sector_identifier_uri"] = sector_identifier_uri
if subject_type is not UNSET:
field_dict["subject_type"] = subject_type
if token_endpoint_auth_method is not UNSET:
field_dict["token_endpoint_auth_method"] = token_endpoint_auth_method
if token_endpoint_auth_signing_alg is not UNSET:
field_dict["token_endpoint_auth_signing_alg"] = token_endpoint_auth_signing_alg
if tos_uri is not UNSET:
field_dict["tos_uri"] = tos_uri
if updated_at is not UNSET:
field_dict["updated_at"] = updated_at
if userinfo_signed_response_alg is not UNSET:
field_dict["userinfo_signed_response_alg"] = userinfo_signed_response_alg
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
allowed_cors_origins = cast(List[str], _d.pop("allowed_cors_origins", UNSET))
audience = cast(List[str], _d.pop("audience", UNSET))
backchannel_logout_session_required = _d.pop("backchannel_logout_session_required", UNSET)
backchannel_logout_uri = _d.pop("backchannel_logout_uri", UNSET)
client_id = _d.pop("client_id", UNSET)
client_name = _d.pop("client_name", UNSET)
client_secret = _d.pop("client_secret", UNSET)
client_secret_expires_at = _d.pop("client_secret_expires_at", UNSET)
client_uri = _d.pop("client_uri", UNSET)
contacts = cast(List[str], _d.pop("contacts", UNSET))
_created_at = _d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]
if isinstance(_created_at, Unset):
created_at = UNSET
else:
created_at = isoparse(_created_at)
frontchannel_logout_session_required = _d.pop("frontchannel_logout_session_required", UNSET)
frontchannel_logout_uri = _d.pop("frontchannel_logout_uri", UNSET)
grant_types = cast(List[str], _d.pop("grant_types", UNSET))
_jwks = _d.pop("jwks", UNSET)
jwks: Union[Unset, JoseJSONWebKeySet]
if isinstance(_jwks, Unset):
jwks = UNSET
else:
jwks = JoseJSONWebKeySet.from_dict(_jwks)
jwks_uri = _d.pop("jwks_uri", UNSET)
logo_uri = _d.pop("logo_uri", UNSET)
_metadata = _d.pop("metadata", UNSET)
metadata: Union[Unset, JSONRawMessage]
if isinstance(_metadata, Unset):
metadata = UNSET
else:
metadata = JSONRawMessage.from_dict(_metadata)
owner = _d.pop("owner", UNSET)
policy_uri = _d.pop("policy_uri", UNSET)
post_logout_redirect_uris = cast(List[str], _d.pop("post_logout_redirect_uris", UNSET))
redirect_uris = cast(List[str], _d.pop("redirect_uris", UNSET))
request_object_signing_alg = _d.pop("request_object_signing_alg", UNSET)
request_uris = cast(List[str], _d.pop("request_uris", UNSET))
response_types = cast(List[str], _d.pop("response_types", UNSET))
scope = _d.pop("scope", UNSET)
sector_identifier_uri = _d.pop("sector_identifier_uri", UNSET)
subject_type = _d.pop("subject_type", UNSET)
token_endpoint_auth_method = _d.pop("token_endpoint_auth_method", UNSET)
token_endpoint_auth_signing_alg = _d.pop("token_endpoint_auth_signing_alg", UNSET)
tos_uri = _d.pop("tos_uri", UNSET)
_updated_at = _d.pop("updated_at", UNSET)
updated_at: Union[Unset, datetime.datetime]
if isinstance(_updated_at, Unset):
updated_at = UNSET
else:
updated_at = isoparse(_updated_at)
userinfo_signed_response_alg = _d.pop("userinfo_signed_response_alg", UNSET)
o_auth_2_client = cls(
allowed_cors_origins=allowed_cors_origins,
audience=audience,
backchannel_logout_session_required=backchannel_logout_session_required,
backchannel_logout_uri=backchannel_logout_uri,
client_id=client_id,
client_name=client_name,
client_secret=client_secret,
client_secret_expires_at=client_secret_expires_at,
client_uri=client_uri,
contacts=contacts,
created_at=created_at,
frontchannel_logout_session_required=frontchannel_logout_session_required,
frontchannel_logout_uri=frontchannel_logout_uri,
grant_types=grant_types,
jwks=jwks,
jwks_uri=jwks_uri,
logo_uri=logo_uri,
metadata=metadata,
owner=owner,
policy_uri=policy_uri,
post_logout_redirect_uris=post_logout_redirect_uris,
redirect_uris=redirect_uris,
request_object_signing_alg=request_object_signing_alg,
request_uris=request_uris,
response_types=response_types,
scope=scope,
sector_identifier_uri=sector_identifier_uri,
subject_type=subject_type,
token_endpoint_auth_method=token_endpoint_auth_method,
token_endpoint_auth_signing_alg=token_endpoint_auth_signing_alg,
tos_uri=tos_uri,
updated_at=updated_at,
userinfo_signed_response_alg=userinfo_signed_response_alg,
)
o_auth_2_client.additional_properties = _d
return o_auth_2_client
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,197 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.o_auth_2_token_introspection_ext import OAuth2TokenIntrospectionExt
from ..types import UNSET, Unset
T = TypeVar("T", bound="OAuth2TokenIntrospection")
@attr.s(auto_attribs=True)
class OAuth2TokenIntrospection:
"""https://tools.ietf.org/html/rfc7662
Attributes:
active (bool): Active is a boolean indicator of whether or not the presented token
is currently active. The specifics of a token's "active" state
will vary depending on the implementation of the authorization
server and the information it keeps about its tokens, but a "true"
value return for the "active" property will generally indicate
that a given token has been issued by this authorization server,
has not been revoked by the resource owner, and is within its
given time window of validity (e.g., after its issuance time and
before its expiration time).
aud (Union[Unset, List[str]]): Audience contains a list of the token's intended audiences.
client_id (Union[Unset, str]): ID is aclient identifier for the OAuth 2.0 client that
requested this token.
exp (Union[Unset, int]): Expires at is an integer timestamp, measured in the number of seconds
since January 1 1970 UTC, indicating when this token will expire.
ext (Union[Unset, OAuth2TokenIntrospectionExt]): Extra is arbitrary data set by the session.
iat (Union[Unset, int]): Issued at is an integer timestamp, measured in the number of seconds
since January 1 1970 UTC, indicating when this token was
originally issued.
iss (Union[Unset, str]): IssuerURL is a string representing the issuer of this token
nbf (Union[Unset, int]): NotBefore is an integer timestamp, measured in the number of seconds
since January 1 1970 UTC, indicating when this token is not to be
used before.
obfuscated_subject (Union[Unset, str]): ObfuscatedSubject is set when the subject identifier algorithm was set
to "pairwise" during authorization.
It is the `sub` value of the ID Token that was issued.
scope (Union[Unset, str]): Scope is a JSON string containing a space-separated list of
scopes associated with this token.
sub (Union[Unset, str]): Subject of the token, as defined in JWT [RFC7519].
Usually a machine-readable identifier of the resource owner who
authorized this token.
token_type (Union[Unset, str]): TokenType is the introspected token's type, typically `Bearer`.
token_use (Union[Unset, str]): TokenUse is the introspected token's use, for example `access_token` or
`refresh_token`.
username (Union[Unset, str]): Username is a human-readable identifier for the resource owner who
authorized this token.
"""
active: bool
aud: Union[Unset, List[str]] = UNSET
client_id: Union[Unset, str] = UNSET
exp: Union[Unset, int] = UNSET
ext: Union[Unset, OAuth2TokenIntrospectionExt] = UNSET
iat: Union[Unset, int] = UNSET
iss: Union[Unset, str] = UNSET
nbf: Union[Unset, int] = UNSET
obfuscated_subject: Union[Unset, str] = UNSET
scope: Union[Unset, str] = UNSET
sub: Union[Unset, str] = UNSET
token_type: Union[Unset, str] = UNSET
token_use: Union[Unset, str] = UNSET
username: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
active = self.active
aud: Union[Unset, List[str]] = UNSET
if not isinstance(self.aud, Unset):
aud = self.aud
client_id = self.client_id
exp = self.exp
ext: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.ext, Unset):
ext = self.ext.to_dict()
iat = self.iat
iss = self.iss
nbf = self.nbf
obfuscated_subject = self.obfuscated_subject
scope = self.scope
sub = self.sub
token_type = self.token_type
token_use = self.token_use
username = self.username
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"active": active,
}
)
if aud is not UNSET:
field_dict["aud"] = aud
if client_id is not UNSET:
field_dict["client_id"] = client_id
if exp is not UNSET:
field_dict["exp"] = exp
if ext is not UNSET:
field_dict["ext"] = ext
if iat is not UNSET:
field_dict["iat"] = iat
if iss is not UNSET:
field_dict["iss"] = iss
if nbf is not UNSET:
field_dict["nbf"] = nbf
if obfuscated_subject is not UNSET:
field_dict["obfuscated_subject"] = obfuscated_subject
if scope is not UNSET:
field_dict["scope"] = scope
if sub is not UNSET:
field_dict["sub"] = sub
if token_type is not UNSET:
field_dict["token_type"] = token_type
if token_use is not UNSET:
field_dict["token_use"] = token_use
if username is not UNSET:
field_dict["username"] = username
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
active = _d.pop("active")
aud = cast(List[str], _d.pop("aud", UNSET))
client_id = _d.pop("client_id", UNSET)
exp = _d.pop("exp", UNSET)
_ext = _d.pop("ext", UNSET)
ext: Union[Unset, OAuth2TokenIntrospectionExt]
if isinstance(_ext, Unset):
ext = UNSET
else:
ext = OAuth2TokenIntrospectionExt.from_dict(_ext)
iat = _d.pop("iat", UNSET)
iss = _d.pop("iss", UNSET)
nbf = _d.pop("nbf", UNSET)
obfuscated_subject = _d.pop("obfuscated_subject", UNSET)
scope = _d.pop("scope", UNSET)
sub = _d.pop("sub", UNSET)
token_type = _d.pop("token_type", UNSET)
token_use = _d.pop("token_use", UNSET)
username = _d.pop("username", UNSET)
o_auth_2_token_introspection = cls(
active=active,
aud=aud,
client_id=client_id,
exp=exp,
ext=ext,
iat=iat,
iss=iss,
nbf=nbf,
obfuscated_subject=obfuscated_subject,
scope=scope,
sub=sub,
token_type=token_type,
token_use=token_use,
username=username,
)
o_auth_2_token_introspection.additional_properties = _d
return o_auth_2_token_introspection
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,44 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="OAuth2TokenIntrospectionExt")
@attr.s(auto_attribs=True)
class OAuth2TokenIntrospectionExt:
"""Extra is arbitrary data set by the session."""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
o_auth_2_token_introspection_ext = cls()
o_auth_2_token_introspection_ext.additional_properties = _d
return o_auth_2_token_introspection_ext
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,98 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="Oauth2TokenResponse")
@attr.s(auto_attribs=True)
class Oauth2TokenResponse:
"""The Access Token Response
Attributes:
access_token (Union[Unset, str]):
expires_in (Union[Unset, int]):
id_token (Union[Unset, str]):
refresh_token (Union[Unset, str]):
scope (Union[Unset, str]):
token_type (Union[Unset, str]):
"""
access_token: Union[Unset, str] = UNSET
expires_in: Union[Unset, int] = UNSET
id_token: Union[Unset, str] = UNSET
refresh_token: Union[Unset, str] = UNSET
scope: Union[Unset, str] = UNSET
token_type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
access_token = self.access_token
expires_in = self.expires_in
id_token = self.id_token
refresh_token = self.refresh_token
scope = self.scope
token_type = self.token_type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if access_token is not UNSET:
field_dict["access_token"] = access_token
if expires_in is not UNSET:
field_dict["expires_in"] = expires_in
if id_token is not UNSET:
field_dict["id_token"] = id_token
if refresh_token is not UNSET:
field_dict["refresh_token"] = refresh_token
if scope is not UNSET:
field_dict["scope"] = scope
if token_type is not UNSET:
field_dict["token_type"] = token_type
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
access_token = _d.pop("access_token", UNSET)
expires_in = _d.pop("expires_in", UNSET)
id_token = _d.pop("id_token", UNSET)
refresh_token = _d.pop("refresh_token", UNSET)
scope = _d.pop("scope", UNSET)
token_type = _d.pop("token_type", UNSET)
oauth_2_token_response = cls(
access_token=access_token,
expires_in=expires_in,
id_token=id_token,
refresh_token=refresh_token,
scope=scope,
token_type=token_type,
)
oauth_2_token_response.additional_properties = _d
return oauth_2_token_response
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,140 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.open_id_connect_context_id_token_hint_claims import OpenIDConnectContextIdTokenHintClaims
from ..types import UNSET, Unset
T = TypeVar("T", bound="OpenIDConnectContext")
@attr.s(auto_attribs=True)
class OpenIDConnectContext:
"""
Attributes:
acr_values (Union[Unset, List[str]]): ACRValues is the Authentication AuthorizationContext Class Reference
requested in the OAuth 2.0 Authorization request.
It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required.
OpenID Connect defines it as follows:
> Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies
the acr values
that the Authorization Server is being requested to use for processing this Authentication Request, with the
values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the
authentication
performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a
Voluntary Claim by this parameter.
display (Union[Unset, str]): Display is a string value that specifies how the Authorization Server displays the
authentication and consent user interface pages to the End-User.
The defined values are:
page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User
Agent page view. If the display parameter is not specified, this is the default display mode.
popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User
Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should
not obscure the entire window that it is popping up over.
touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that
leverages a touch interface.
wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a "feature phone"
type display.
The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an
appropriate display.
id_token_hint_claims (Union[Unset, OpenIDConnectContextIdTokenHintClaims]): IDTokenHintClaims are the claims of
the ID Token previously issued by the Authorization Server being passed as a hint about the
End-User's current or past authenticated session with the Client.
login_hint (Union[Unset, str]): LoginHint hints about the login identifier the End-User might use to log in (if
necessary).
This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier)
and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a
phone number in the format specified for the phone_number Claim. The use of this parameter is optional.
ui_locales (Union[Unset, List[str]]): UILocales is the End-User'id preferred languages and scripts for the user
interface, represented as a
space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value
"fr-CA fr en" represents a preference for French as spoken in Canada, then French (without a region
designation),
followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested
locales are not supported by the OpenID Provider.
"""
acr_values: Union[Unset, List[str]] = UNSET
display: Union[Unset, str] = UNSET
id_token_hint_claims: Union[Unset, OpenIDConnectContextIdTokenHintClaims] = UNSET
login_hint: Union[Unset, str] = UNSET
ui_locales: Union[Unset, List[str]] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
acr_values: Union[Unset, List[str]] = UNSET
if not isinstance(self.acr_values, Unset):
acr_values = self.acr_values
display = self.display
id_token_hint_claims: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.id_token_hint_claims, Unset):
id_token_hint_claims = self.id_token_hint_claims.to_dict()
login_hint = self.login_hint
ui_locales: Union[Unset, List[str]] = UNSET
if not isinstance(self.ui_locales, Unset):
ui_locales = self.ui_locales
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if acr_values is not UNSET:
field_dict["acr_values"] = acr_values
if display is not UNSET:
field_dict["display"] = display
if id_token_hint_claims is not UNSET:
field_dict["id_token_hint_claims"] = id_token_hint_claims
if login_hint is not UNSET:
field_dict["login_hint"] = login_hint
if ui_locales is not UNSET:
field_dict["ui_locales"] = ui_locales
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
acr_values = cast(List[str], _d.pop("acr_values", UNSET))
display = _d.pop("display", UNSET)
_id_token_hint_claims = _d.pop("id_token_hint_claims", UNSET)
id_token_hint_claims: Union[Unset, OpenIDConnectContextIdTokenHintClaims]
if isinstance(_id_token_hint_claims, Unset):
id_token_hint_claims = UNSET
else:
id_token_hint_claims = OpenIDConnectContextIdTokenHintClaims.from_dict(_id_token_hint_claims)
login_hint = _d.pop("login_hint", UNSET)
ui_locales = cast(List[str], _d.pop("ui_locales", UNSET))
open_id_connect_context = cls(
acr_values=acr_values,
display=display,
id_token_hint_claims=id_token_hint_claims,
login_hint=login_hint,
ui_locales=ui_locales,
)
open_id_connect_context.additional_properties = _d
return open_id_connect_context
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,48 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="OpenIDConnectContextIdTokenHintClaims")
@attr.s(auto_attribs=True)
class OpenIDConnectContextIdTokenHintClaims:
"""IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a
hint about the
End-User's current or past authenticated session with the Client.
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
open_id_connect_context_id_token_hint_claims = cls()
open_id_connect_context_id_token_hint_claims.additional_properties = _d
return open_id_connect_context_id_token_hint_claims
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,215 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.plugin_config_args import PluginConfigArgs
from ..models.plugin_config_interface import PluginConfigInterface
from ..models.plugin_config_linux import PluginConfigLinux
from ..models.plugin_config_network import PluginConfigNetwork
from ..models.plugin_config_rootfs import PluginConfigRootfs
from ..models.plugin_config_user import PluginConfigUser
from ..models.plugin_env import PluginEnv
from ..models.plugin_mount import PluginMount
from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfig")
@attr.s(auto_attribs=True)
class PluginConfig:
"""
Attributes:
args (PluginConfigArgs): PluginConfigArgs plugin config args
description (str): description
documentation (str): documentation
entrypoint (List[str]): entrypoint
env (List[PluginEnv]): env
interface (PluginConfigInterface): PluginConfigInterface The interface between Docker and the plugin
ipc_host (bool): ipc host
linux (PluginConfigLinux): PluginConfigLinux plugin config linux
mounts (List[PluginMount]): mounts
network (PluginConfigNetwork): PluginConfigNetwork plugin config network
pid_host (bool): pid host
propagated_mount (str): propagated mount
work_dir (str): work dir
docker_version (Union[Unset, str]): Docker Version used to create the plugin
user (Union[Unset, PluginConfigUser]): PluginConfigUser plugin config user
rootfs (Union[Unset, PluginConfigRootfs]): PluginConfigRootfs plugin config rootfs
"""
args: PluginConfigArgs
description: str
documentation: str
entrypoint: List[str]
env: List[PluginEnv]
interface: PluginConfigInterface
ipc_host: bool
linux: PluginConfigLinux
mounts: List[PluginMount]
network: PluginConfigNetwork
pid_host: bool
propagated_mount: str
work_dir: str
docker_version: Union[Unset, str] = UNSET
user: Union[Unset, PluginConfigUser] = UNSET
rootfs: Union[Unset, PluginConfigRootfs] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
args = self.args.to_dict()
description = self.description
documentation = self.documentation
entrypoint = self.entrypoint
env = []
for env_item_data in self.env:
env_item = env_item_data.to_dict()
env.append(env_item)
interface = self.interface.to_dict()
ipc_host = self.ipc_host
linux = self.linux.to_dict()
mounts = []
for mounts_item_data in self.mounts:
mounts_item = mounts_item_data.to_dict()
mounts.append(mounts_item)
network = self.network.to_dict()
pid_host = self.pid_host
propagated_mount = self.propagated_mount
work_dir = self.work_dir
docker_version = self.docker_version
user: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.user, Unset):
user = self.user.to_dict()
rootfs: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.rootfs, Unset):
rootfs = self.rootfs.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Args": args,
"Description": description,
"Documentation": documentation,
"Entrypoint": entrypoint,
"Env": env,
"Interface": interface,
"IpcHost": ipc_host,
"Linux": linux,
"Mounts": mounts,
"Network": network,
"PidHost": pid_host,
"PropagatedMount": propagated_mount,
"WorkDir": work_dir,
}
)
if docker_version is not UNSET:
field_dict["DockerVersion"] = docker_version
if user is not UNSET:
field_dict["User"] = user
if rootfs is not UNSET:
field_dict["rootfs"] = rootfs
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
args = PluginConfigArgs.from_dict(_d.pop("Args"))
description = _d.pop("Description")
documentation = _d.pop("Documentation")
entrypoint = cast(List[str], _d.pop("Entrypoint"))
env = []
_env = _d.pop("Env")
for env_item_data in _env:
env_item = PluginEnv.from_dict(env_item_data)
env.append(env_item)
interface = PluginConfigInterface.from_dict(_d.pop("Interface"))
ipc_host = _d.pop("IpcHost")
linux = PluginConfigLinux.from_dict(_d.pop("Linux"))
mounts = []
_mounts = _d.pop("Mounts")
for mounts_item_data in _mounts:
mounts_item = PluginMount.from_dict(mounts_item_data)
mounts.append(mounts_item)
network = PluginConfigNetwork.from_dict(_d.pop("Network"))
pid_host = _d.pop("PidHost")
propagated_mount = _d.pop("PropagatedMount")
work_dir = _d.pop("WorkDir")
docker_version = _d.pop("DockerVersion", UNSET)
_user = _d.pop("User", UNSET)
user: Union[Unset, PluginConfigUser]
if isinstance(_user, Unset):
user = UNSET
else:
user = PluginConfigUser.from_dict(_user)
_rootfs = _d.pop("rootfs", UNSET)
rootfs: Union[Unset, PluginConfigRootfs]
if isinstance(_rootfs, Unset):
rootfs = UNSET
else:
rootfs = PluginConfigRootfs.from_dict(_rootfs)
plugin_config = cls(
args=args,
description=description,
documentation=documentation,
entrypoint=entrypoint,
env=env,
interface=interface,
ipc_host=ipc_host,
linux=linux,
mounts=mounts,
network=network,
pid_host=pid_host,
propagated_mount=propagated_mount,
work_dir=work_dir,
docker_version=docker_version,
user=user,
rootfs=rootfs,
)
plugin_config.additional_properties = _d
return plugin_config
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,80 @@
from typing import Any, Dict, List, Type, TypeVar, cast
import attr
T = TypeVar("T", bound="PluginConfigArgs")
@attr.s(auto_attribs=True)
class PluginConfigArgs:
"""PluginConfigArgs plugin config args
Attributes:
description (str): description
name (str): name
settable (List[str]): settable
value (List[str]): value
"""
description: str
name: str
settable: List[str]
value: List[str]
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
description = self.description
name = self.name
settable = self.settable
value = self.value
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Description": description,
"Name": name,
"Settable": settable,
"Value": value,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
description = _d.pop("Description")
name = _d.pop("Name")
settable = cast(List[str], _d.pop("Settable"))
value = cast(List[str], _d.pop("Value"))
plugin_config_args = cls(
description=description,
name=name,
settable=settable,
value=value,
)
plugin_config_args.additional_properties = _d
return plugin_config_args
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,76 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
from ..models.plugin_interface_type import PluginInterfaceType
T = TypeVar("T", bound="PluginConfigInterface")
@attr.s(auto_attribs=True)
class PluginConfigInterface:
"""PluginConfigInterface The interface between Docker and the plugin
Attributes:
socket (str): socket
types (List[PluginInterfaceType]): types
"""
socket: str
types: List[PluginInterfaceType]
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
socket = self.socket
types = []
for types_item_data in self.types:
types_item = types_item_data.to_dict()
types.append(types_item)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Socket": socket,
"Types": types,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
socket = _d.pop("Socket")
types = []
_types = _d.pop("Types")
for types_item_data in _types:
types_item = PluginInterfaceType.from_dict(types_item_data)
types.append(types_item)
plugin_config_interface = cls(
socket=socket,
types=types,
)
plugin_config_interface.additional_properties = _d
return plugin_config_interface
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,84 @@
from typing import Any, Dict, List, Type, TypeVar, cast
import attr
from ..models.plugin_device import PluginDevice
T = TypeVar("T", bound="PluginConfigLinux")
@attr.s(auto_attribs=True)
class PluginConfigLinux:
"""PluginConfigLinux plugin config linux
Attributes:
allow_all_devices (bool): allow all devices
capabilities (List[str]): capabilities
devices (List[PluginDevice]): devices
"""
allow_all_devices: bool
capabilities: List[str]
devices: List[PluginDevice]
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
allow_all_devices = self.allow_all_devices
capabilities = self.capabilities
devices = []
for devices_item_data in self.devices:
devices_item = devices_item_data.to_dict()
devices.append(devices_item)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"AllowAllDevices": allow_all_devices,
"Capabilities": capabilities,
"Devices": devices,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
allow_all_devices = _d.pop("AllowAllDevices")
capabilities = cast(List[str], _d.pop("Capabilities"))
devices = []
_devices = _d.pop("Devices")
for devices_item_data in _devices:
devices_item = PluginDevice.from_dict(devices_item_data)
devices.append(devices_item)
plugin_config_linux = cls(
allow_all_devices=allow_all_devices,
capabilities=capabilities,
devices=devices,
)
plugin_config_linux.additional_properties = _d
return plugin_config_linux
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,58 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="PluginConfigNetwork")
@attr.s(auto_attribs=True)
class PluginConfigNetwork:
"""PluginConfigNetwork plugin config network
Attributes:
type (str): type
"""
type: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Type": type,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
type = _d.pop("Type")
plugin_config_network = cls(
type=type,
)
plugin_config_network.additional_properties = _d
return plugin_config_network
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,69 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfigRootfs")
@attr.s(auto_attribs=True)
class PluginConfigRootfs:
"""PluginConfigRootfs plugin config rootfs
Attributes:
diff_ids (Union[Unset, List[str]]): diff ids
type (Union[Unset, str]): type
"""
diff_ids: Union[Unset, List[str]] = UNSET
type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
diff_ids: Union[Unset, List[str]] = UNSET
if not isinstance(self.diff_ids, Unset):
diff_ids = self.diff_ids
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if diff_ids is not UNSET:
field_dict["diff_ids"] = diff_ids
if type is not UNSET:
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
diff_ids = cast(List[str], _d.pop("diff_ids", UNSET))
type = _d.pop("type", UNSET)
plugin_config_rootfs = cls(
diff_ids=diff_ids,
type=type,
)
plugin_config_rootfs.additional_properties = _d
return plugin_config_rootfs
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,66 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfigUser")
@attr.s(auto_attribs=True)
class PluginConfigUser:
"""PluginConfigUser plugin config user
Attributes:
gid (Union[Unset, int]): g ID
uid (Union[Unset, int]): UID
"""
gid: Union[Unset, int] = UNSET
uid: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
gid = self.gid
uid = self.uid
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if gid is not UNSET:
field_dict["GID"] = gid
if uid is not UNSET:
field_dict["UID"] = uid
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
gid = _d.pop("GID", UNSET)
uid = _d.pop("UID", UNSET)
plugin_config_user = cls(
gid=gid,
uid=uid,
)
plugin_config_user.additional_properties = _d
return plugin_config_user
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,79 @@
from typing import Any, Dict, List, Type, TypeVar, cast
import attr
T = TypeVar("T", bound="PluginDevice")
@attr.s(auto_attribs=True)
class PluginDevice:
"""PluginDevice plugin device
Attributes:
description (str): description
name (str): name
path (str): path
settable (List[str]): settable
"""
description: str
name: str
path: str
settable: List[str]
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
description = self.description
name = self.name
path = self.path
settable = self.settable
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Description": description,
"Name": name,
"Path": path,
"Settable": settable,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
description = _d.pop("Description")
name = _d.pop("Name")
path = _d.pop("Path")
settable = cast(List[str], _d.pop("Settable"))
plugin_device = cls(
description=description,
name=name,
path=path,
settable=settable,
)
plugin_device.additional_properties = _d
return plugin_device
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,80 @@
from typing import Any, Dict, List, Type, TypeVar, cast
import attr
T = TypeVar("T", bound="PluginEnv")
@attr.s(auto_attribs=True)
class PluginEnv:
"""PluginEnv plugin env
Attributes:
description (str): description
name (str): name
settable (List[str]): settable
value (str): value
"""
description: str
name: str
settable: List[str]
value: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
description = self.description
name = self.name
settable = self.settable
value = self.value
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Description": description,
"Name": name,
"Settable": settable,
"Value": value,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
description = _d.pop("Description")
name = _d.pop("Name")
settable = cast(List[str], _d.pop("Settable"))
value = _d.pop("Value")
plugin_env = cls(
description=description,
name=name,
settable=settable,
value=value,
)
plugin_env.additional_properties = _d
return plugin_env
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,72 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="PluginInterfaceType")
@attr.s(auto_attribs=True)
class PluginInterfaceType:
"""PluginInterfaceType plugin interface type
Attributes:
capability (str): capability
prefix (str): prefix
version (str): version
"""
capability: str
prefix: str
version: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
capability = self.capability
prefix = self.prefix
version = self.version
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Capability": capability,
"Prefix": prefix,
"Version": version,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
capability = _d.pop("Capability")
prefix = _d.pop("Prefix")
version = _d.pop("Version")
plugin_interface_type = cls(
capability=capability,
prefix=prefix,
version=version,
)
plugin_interface_type.additional_properties = _d
return plugin_interface_type
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,102 @@
from typing import Any, Dict, List, Type, TypeVar, cast
import attr
T = TypeVar("T", bound="PluginMount")
@attr.s(auto_attribs=True)
class PluginMount:
"""PluginMount plugin mount
Attributes:
description (str): description
destination (str): destination
name (str): name
options (List[str]): options
settable (List[str]): settable
source (str): source
type (str): type
"""
description: str
destination: str
name: str
options: List[str]
settable: List[str]
source: str
type: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
description = self.description
destination = self.destination
name = self.name
options = self.options
settable = self.settable
source = self.source
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Description": description,
"Destination": destination,
"Name": name,
"Options": options,
"Settable": settable,
"Source": source,
"Type": type,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
description = _d.pop("Description")
destination = _d.pop("Destination")
name = _d.pop("Name")
options = cast(List[str], _d.pop("Options"))
settable = cast(List[str], _d.pop("Settable"))
source = _d.pop("Source")
type = _d.pop("Type")
plugin_mount = cls(
description=description,
destination=destination,
name=name,
options=options,
settable=settable,
source=source,
type=type,
)
plugin_mount.additional_properties = _d
return plugin_mount
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,102 @@
from typing import Any, Dict, List, Type, TypeVar, cast
import attr
from ..models.plugin_device import PluginDevice
from ..models.plugin_mount import PluginMount
T = TypeVar("T", bound="PluginSettings")
@attr.s(auto_attribs=True)
class PluginSettings:
"""
Attributes:
args (List[str]): args
devices (List[PluginDevice]): devices
env (List[str]): env
mounts (List[PluginMount]): mounts
"""
args: List[str]
devices: List[PluginDevice]
env: List[str]
mounts: List[PluginMount]
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
args = self.args
devices = []
for devices_item_data in self.devices:
devices_item = devices_item_data.to_dict()
devices.append(devices_item)
env = self.env
mounts = []
for mounts_item_data in self.mounts:
mounts_item = mounts_item_data.to_dict()
mounts.append(mounts_item)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Args": args,
"Devices": devices,
"Env": env,
"Mounts": mounts,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
args = cast(List[str], _d.pop("Args"))
devices = []
_devices = _d.pop("Devices")
for devices_item_data in _devices:
devices_item = PluginDevice.from_dict(devices_item_data)
devices.append(devices_item)
env = cast(List[str], _d.pop("Env"))
mounts = []
_mounts = _d.pop("Mounts")
for mounts_item_data in _mounts:
mounts_item = PluginMount.from_dict(mounts_item_data)
mounts.append(mounts_item)
plugin_settings = cls(
args=args,
devices=devices,
env=env,
mounts=mounts,
)
plugin_settings.additional_properties = _d
return plugin_settings
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,144 @@
import datetime
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from dateutil.parser import isoparse
from ..models.consent_request import ConsentRequest
from ..models.consent_request_session import ConsentRequestSession
from ..types import UNSET, Unset
T = TypeVar("T", bound="PreviousConsentSession")
@attr.s(auto_attribs=True)
class PreviousConsentSession:
"""The response used to return used consent requests
same as HandledLoginRequest, just with consent_request exposed as json
Attributes:
consent_request (Union[Unset, ConsentRequest]):
grant_access_token_audience (Union[Unset, List[str]]):
grant_scope (Union[Unset, List[str]]):
handled_at (Union[Unset, datetime.datetime]):
remember (Union[Unset, bool]): Remember, if set to true, tells ORY Hydra to remember this consent authorization
and reuse it if the same
client asks the same user for the same, or a subset of, scope.
remember_for (Union[Unset, int]): RememberFor sets how long the consent authorization should be remembered for
in seconds. If set to `0`, the
authorization will be remembered indefinitely.
session (Union[Unset, ConsentRequestSession]):
"""
consent_request: Union[Unset, ConsentRequest] = UNSET
grant_access_token_audience: Union[Unset, List[str]] = UNSET
grant_scope: Union[Unset, List[str]] = UNSET
handled_at: Union[Unset, datetime.datetime] = UNSET
remember: Union[Unset, bool] = UNSET
remember_for: Union[Unset, int] = UNSET
session: Union[Unset, ConsentRequestSession] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
consent_request: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.consent_request, Unset):
consent_request = self.consent_request.to_dict()
grant_access_token_audience: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_access_token_audience, Unset):
grant_access_token_audience = self.grant_access_token_audience
grant_scope: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_scope, Unset):
grant_scope = self.grant_scope
handled_at: Union[Unset, str] = UNSET
if not isinstance(self.handled_at, Unset):
handled_at = self.handled_at.isoformat()
remember = self.remember
remember_for = self.remember_for
session: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.session, Unset):
session = self.session.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if consent_request is not UNSET:
field_dict["consent_request"] = consent_request
if grant_access_token_audience is not UNSET:
field_dict["grant_access_token_audience"] = grant_access_token_audience
if grant_scope is not UNSET:
field_dict["grant_scope"] = grant_scope
if handled_at is not UNSET:
field_dict["handled_at"] = handled_at
if remember is not UNSET:
field_dict["remember"] = remember
if remember_for is not UNSET:
field_dict["remember_for"] = remember_for
if session is not UNSET:
field_dict["session"] = session
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
_consent_request = _d.pop("consent_request", UNSET)
consent_request: Union[Unset, ConsentRequest]
if isinstance(_consent_request, Unset):
consent_request = UNSET
else:
consent_request = ConsentRequest.from_dict(_consent_request)
grant_access_token_audience = cast(List[str], _d.pop("grant_access_token_audience", UNSET))
grant_scope = cast(List[str], _d.pop("grant_scope", UNSET))
_handled_at = _d.pop("handled_at", UNSET)
handled_at: Union[Unset, datetime.datetime]
if isinstance(_handled_at, Unset):
handled_at = UNSET
else:
handled_at = isoparse(_handled_at)
remember = _d.pop("remember", UNSET)
remember_for = _d.pop("remember_for", UNSET)
_session = _d.pop("session", UNSET)
session: Union[Unset, ConsentRequestSession]
if isinstance(_session, Unset):
session = UNSET
else:
session = ConsentRequestSession.from_dict(_session)
previous_consent_session = cls(
consent_request=consent_request,
grant_access_token_audience=grant_access_token_audience,
grant_scope=grant_scope,
handled_at=handled_at,
remember=remember,
remember_for=remember_for,
session=session,
)
previous_consent_session.additional_properties = _d
return previous_consent_session
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,96 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="RejectRequest")
@attr.s(auto_attribs=True)
class RejectRequest:
"""
Attributes:
error (Union[Unset, str]): The error should follow the OAuth2 error format (e.g. `invalid_request`,
`login_required`).
Defaults to `request_denied`.
error_debug (Union[Unset, str]): Debug contains information to help resolve the problem as a developer. Usually
not exposed
to the public but only in the server logs.
error_description (Union[Unset, str]): Description of the error in a human readable format.
error_hint (Union[Unset, str]): Hint to help resolve the error.
status_code (Union[Unset, int]): Represents the HTTP status code of the error (e.g. 401 or 403)
Defaults to 400
"""
error: Union[Unset, str] = UNSET
error_debug: Union[Unset, str] = UNSET
error_description: Union[Unset, str] = UNSET
error_hint: Union[Unset, str] = UNSET
status_code: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
error = self.error
error_debug = self.error_debug
error_description = self.error_description
error_hint = self.error_hint
status_code = self.status_code
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if error is not UNSET:
field_dict["error"] = error
if error_debug is not UNSET:
field_dict["error_debug"] = error_debug
if error_description is not UNSET:
field_dict["error_description"] = error_description
if error_hint is not UNSET:
field_dict["error_hint"] = error_hint
if status_code is not UNSET:
field_dict["status_code"] = status_code
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
error = _d.pop("error", UNSET)
error_debug = _d.pop("error_debug", UNSET)
error_description = _d.pop("error_description", UNSET)
error_hint = _d.pop("error_hint", UNSET)
status_code = _d.pop("status_code", UNSET)
reject_request = cls(
error=error,
error_debug=error_debug,
error_description=error_description,
error_hint=error_hint,
status_code=status_code,
)
reject_request.additional_properties = _d
return reject_request
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,239 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="UserinfoResponse")
@attr.s(auto_attribs=True)
class UserinfoResponse:
"""The userinfo response
Attributes:
birthdate (Union[Unset, str]): End-User's birthday, represented as an ISO 8601:2004 [ISO86012004] YYYY-MM-DD
format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed.
Note that depending on the underlying platform's date related function, providing just year can result in
varying month and day, so the implementers need to take this factor into account to correctly process the dates.
email (Union[Unset, str]): End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322]
addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.
email_verified (Union[Unset, bool]): True if the End-User's e-mail address has been verified; otherwise false.
When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address
was controlled by the End-User at the time the verification was performed. The means by which an e-mail address
is verified is context-specific, and dependent upon the trust framework or contractual agreements within which
the parties are operating.
family_name (Union[Unset, str]): Surname(s) or last name(s) of the End-User. Note that in some cultures, people
can have multiple family names or no family name; all can be present, with the names being separated by space
characters.
gender (Union[Unset, str]): End-User's gender. Values defined by this specification are female and male. Other
values MAY be used when neither of the defined values are applicable.
given_name (Union[Unset, str]): Given name(s) or first name(s) of the End-User. Note that in some cultures,
people can have multiple given names; all can be present, with the names being separated by space characters.
locale (Union[Unset, str]): End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically
an ISO 639-1 Alpha-2 [ISO6391] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO31661] country code in
uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have
used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept
this locale syntax as well.
middle_name (Union[Unset, str]): Middle name(s) of the End-User. Note that in some cultures, people can have
multiple middle names; all can be present, with the names being separated by space characters. Also note that in
some cultures, middle names are not used.
name (Union[Unset, str]): End-User's full name in displayable form including all name parts, possibly including
titles and suffixes, ordered according to the End-User's locale and preferences.
nickname (Union[Unset, str]): Casual name of the End-User that may or may not be the same as the given_name. For
instance, a nickname value of Mike might be returned alongside a given_name value of Michael.
phone_number (Union[Unset, str]): End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the
format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an
extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax,
for example, +1 (604) 555-1234;ext=5678.
phone_number_verified (Union[Unset, bool]): True if the End-User's phone number has been verified; otherwise
false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone
number was controlled by the End-User at the time the verification was performed. The means by which a phone
number is verified is context-specific, and dependent upon the trust framework or contractual agreements within
which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions
MUST be represented in RFC 3966 format.
picture (Union[Unset, str]): URL of the End-User's profile picture. This URL MUST refer to an image file (for
example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL
SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-
User, rather than an arbitrary photo taken by the End-User.
preferred_username (Union[Unset, str]): Non-unique shorthand name by which the End-User wishes to be referred to
at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such
as @, /, or whitespace.
profile (Union[Unset, str]): URL of the End-User's profile page. The contents of this Web page SHOULD be about
the End-User.
sub (Union[Unset, str]): Subject - Identifier for the End-User at the IssuerURL.
updated_at (Union[Unset, int]): Time the End-User's information was last updated. Its value is a JSON number
representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.
website (Union[Unset, str]): URL of the End-User's Web page or blog. This Web page SHOULD contain information
published by the End-User or an organization that the End-User is affiliated with.
zoneinfo (Union[Unset, str]): String from zoneinfo [zoneinfo] time zone database representing the End-User's
time zone. For example, Europe/Paris or America/Los_Angeles.
"""
birthdate: Union[Unset, str] = UNSET
email: Union[Unset, str] = UNSET
email_verified: Union[Unset, bool] = UNSET
family_name: Union[Unset, str] = UNSET
gender: Union[Unset, str] = UNSET
given_name: Union[Unset, str] = UNSET
locale: Union[Unset, str] = UNSET
middle_name: Union[Unset, str] = UNSET
name: Union[Unset, str] = UNSET
nickname: Union[Unset, str] = UNSET
phone_number: Union[Unset, str] = UNSET
phone_number_verified: Union[Unset, bool] = UNSET
picture: Union[Unset, str] = UNSET
preferred_username: Union[Unset, str] = UNSET
profile: Union[Unset, str] = UNSET
sub: Union[Unset, str] = UNSET
updated_at: Union[Unset, int] = UNSET
website: Union[Unset, str] = UNSET
zoneinfo: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
birthdate = self.birthdate
email = self.email
email_verified = self.email_verified
family_name = self.family_name
gender = self.gender
given_name = self.given_name
locale = self.locale
middle_name = self.middle_name
name = self.name
nickname = self.nickname
phone_number = self.phone_number
phone_number_verified = self.phone_number_verified
picture = self.picture
preferred_username = self.preferred_username
profile = self.profile
sub = self.sub
updated_at = self.updated_at
website = self.website
zoneinfo = self.zoneinfo
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if birthdate is not UNSET:
field_dict["birthdate"] = birthdate
if email is not UNSET:
field_dict["email"] = email
if email_verified is not UNSET:
field_dict["email_verified"] = email_verified
if family_name is not UNSET:
field_dict["family_name"] = family_name
if gender is not UNSET:
field_dict["gender"] = gender
if given_name is not UNSET:
field_dict["given_name"] = given_name
if locale is not UNSET:
field_dict["locale"] = locale
if middle_name is not UNSET:
field_dict["middle_name"] = middle_name
if name is not UNSET:
field_dict["name"] = name
if nickname is not UNSET:
field_dict["nickname"] = nickname
if phone_number is not UNSET:
field_dict["phone_number"] = phone_number
if phone_number_verified is not UNSET:
field_dict["phone_number_verified"] = phone_number_verified
if picture is not UNSET:
field_dict["picture"] = picture
if preferred_username is not UNSET:
field_dict["preferred_username"] = preferred_username
if profile is not UNSET:
field_dict["profile"] = profile
if sub is not UNSET:
field_dict["sub"] = sub
if updated_at is not UNSET:
field_dict["updated_at"] = updated_at
if website is not UNSET:
field_dict["website"] = website
if zoneinfo is not UNSET:
field_dict["zoneinfo"] = zoneinfo
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
birthdate = _d.pop("birthdate", UNSET)
email = _d.pop("email", UNSET)
email_verified = _d.pop("email_verified", UNSET)
family_name = _d.pop("family_name", UNSET)
gender = _d.pop("gender", UNSET)
given_name = _d.pop("given_name", UNSET)
locale = _d.pop("locale", UNSET)
middle_name = _d.pop("middle_name", UNSET)
name = _d.pop("name", UNSET)
nickname = _d.pop("nickname", UNSET)
phone_number = _d.pop("phone_number", UNSET)
phone_number_verified = _d.pop("phone_number_verified", UNSET)
picture = _d.pop("picture", UNSET)
preferred_username = _d.pop("preferred_username", UNSET)
profile = _d.pop("profile", UNSET)
sub = _d.pop("sub", UNSET)
updated_at = _d.pop("updated_at", UNSET)
website = _d.pop("website", UNSET)
zoneinfo = _d.pop("zoneinfo", UNSET)
userinfo_response = cls(
birthdate=birthdate,
email=email,
email_verified=email_verified,
family_name=family_name,
gender=gender,
given_name=given_name,
locale=locale,
middle_name=middle_name,
name=name,
nickname=nickname,
phone_number=phone_number,
phone_number_verified=phone_number_verified,
picture=picture,
preferred_username=preferred_username,
profile=profile,
sub=sub,
updated_at=updated_at,
website=website,
zoneinfo=zoneinfo,
)
userinfo_response.additional_properties = _d
return userinfo_response
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,57 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="Version")
@attr.s(auto_attribs=True)
class Version:
"""
Attributes:
version (Union[Unset, str]): Version is the service's version.
"""
version: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
version = self.version
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if version is not UNSET:
field_dict["version"] = version
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
version = _d.pop("version", UNSET)
version = cls(
version=version,
)
version.additional_properties = _d
return version
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,70 @@
from typing import Any, Dict, List, Type, TypeVar
import attr
T = TypeVar("T", bound="VolumeUsageData")
@attr.s(auto_attribs=True)
class VolumeUsageData:
"""VolumeUsageData Usage details about the volume. This information is used by the
`GET /system/df` endpoint, and omitted in other endpoints.
Attributes:
ref_count (int): The number of containers referencing this volume. This field
is set to `-1` if the reference-count is not available.
size (int): Amount of disk space used by the volume (in bytes). This information
is only available for volumes created with the `"local"` volume
driver. For volumes created with other volume drivers, this field
is set to `-1` ("not available")
"""
ref_count: int
size: int
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
ref_count = self.ref_count
size = self.size
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"RefCount": ref_count,
"Size": size,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
ref_count = _d.pop("RefCount")
size = _d.pop("Size")
volume_usage_data = cls(
ref_count=ref_count,
size=size,
)
volume_usage_data.additional_properties = _d
return volume_usage_data
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -0,0 +1,330 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="WellKnown")
@attr.s(auto_attribs=True)
class WellKnown:
"""It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature
algorithms
among others.
Attributes:
authorization_endpoint (str): URL of the OP's OAuth 2.0 Authorization Endpoint. Example:
https://playground.ory.sh/ory-hydra/public/oauth2/auth.
id_token_signing_alg_values_supported (List[str]): JSON array containing a list of the JWS signing algorithms
(alg values) supported by the OP for the ID Token
to encode the Claims in a JWT.
issuer (str): URL using the https scheme with no query or fragment component that the OP asserts as its
IssuerURL Identifier.
If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned
by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.
Example: https://playground.ory.sh/ory-hydra/public/.
jwks_uri (str): URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to
validate
signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs
to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use)
parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage.
Although some algorithms allow the same key to be used for both signatures and encryption, doing so is
NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of
keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.
Example: https://playground.ory.sh/ory-hydra/public/.well-known/jwks.json.
response_types_supported (List[str]): JSON array containing a list of the OAuth 2.0 response_type values that
this OP supports. Dynamic OpenID
Providers MUST support the code, id_token, and the token id_token Response Type values.
subject_types_supported (List[str]): JSON array containing a list of the Subject Identifier types that this OP
supports. Valid types include
pairwise and public.
token_endpoint (str): URL of the OP's OAuth 2.0 Token Endpoint Example: https://playground.ory.sh/ory-
hydra/public/oauth2/token.
backchannel_logout_session_supported (Union[Unset, bool]): Boolean value specifying whether the OP can pass a
sid (session ID) Claim in the Logout Token to identify the RP
session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP
backchannel_logout_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports back-channel
logout, with true indicating support.
claims_parameter_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports use of the
claims parameter, with true indicating support.
claims_supported (Union[Unset, List[str]]): JSON array containing a list of the Claim Names of the Claims that
the OpenID Provider MAY be able to supply
values for. Note that for privacy or other reasons, this might not be an exhaustive list.
end_session_endpoint (Union[Unset, str]): URL at the OP to which an RP can perform a redirect to request that
the End-User be logged out at the OP.
frontchannel_logout_session_supported (Union[Unset, bool]): Boolean value specifying whether the OP can pass iss
(issuer) and sid (session ID) query parameters to identify
the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also
included in ID Tokens issued by the OP.
frontchannel_logout_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports HTTP-based
logout, with true indicating support.
grant_types_supported (Union[Unset, List[str]]): JSON array containing a list of the OAuth 2.0 Grant Type values
that this OP supports.
registration_endpoint (Union[Unset, str]): URL of the OP's Dynamic Client Registration Endpoint. Example:
https://playground.ory.sh/ory-hydra/admin/client.
request_object_signing_alg_values_supported (Union[Unset, List[str]]): JSON array containing a list of the JWS
signing algorithms (alg values) supported by the OP for Request Objects,
which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when
the Request Object is passed by value (using the request parameter) and when it is passed by reference
(using the request_uri parameter).
request_parameter_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports use of the
request parameter, with true indicating support.
request_uri_parameter_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports use of
the request_uri parameter, with true indicating support.
require_request_uri_registration (Union[Unset, bool]): Boolean value specifying whether the OP requires any
request_uri values used to be pre-registered
using the request_uris registration parameter.
response_modes_supported (Union[Unset, List[str]]): JSON array containing a list of the OAuth 2.0 response_mode
values that this OP supports.
revocation_endpoint (Union[Unset, str]): URL of the authorization server's OAuth 2.0 revocation endpoint.
scopes_supported (Union[Unset, List[str]]): SON array containing a list of the OAuth 2.0 [RFC6749] scope values
that this server supports. The server MUST
support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this
parameter is used
token_endpoint_auth_methods_supported (Union[Unset, List[str]]): JSON array containing a list of Client
Authentication methods supported by this Token Endpoint. The options are
client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of
OpenID Connect Core 1.0
userinfo_endpoint (Union[Unset, str]): URL of the OP's UserInfo Endpoint.
userinfo_signing_alg_values_supported (Union[Unset, List[str]]): JSON array containing a list of the JWS [JWS]
signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].
"""
authorization_endpoint: str
id_token_signing_alg_values_supported: List[str]
issuer: str
jwks_uri: str
response_types_supported: List[str]
subject_types_supported: List[str]
token_endpoint: str
backchannel_logout_session_supported: Union[Unset, bool] = UNSET
backchannel_logout_supported: Union[Unset, bool] = UNSET
claims_parameter_supported: Union[Unset, bool] = UNSET
claims_supported: Union[Unset, List[str]] = UNSET
end_session_endpoint: Union[Unset, str] = UNSET
frontchannel_logout_session_supported: Union[Unset, bool] = UNSET
frontchannel_logout_supported: Union[Unset, bool] = UNSET
grant_types_supported: Union[Unset, List[str]] = UNSET
registration_endpoint: Union[Unset, str] = UNSET
request_object_signing_alg_values_supported: Union[Unset, List[str]] = UNSET
request_parameter_supported: Union[Unset, bool] = UNSET
request_uri_parameter_supported: Union[Unset, bool] = UNSET
require_request_uri_registration: Union[Unset, bool] = UNSET
response_modes_supported: Union[Unset, List[str]] = UNSET
revocation_endpoint: Union[Unset, str] = UNSET
scopes_supported: Union[Unset, List[str]] = UNSET
token_endpoint_auth_methods_supported: Union[Unset, List[str]] = UNSET
userinfo_endpoint: Union[Unset, str] = UNSET
userinfo_signing_alg_values_supported: Union[Unset, List[str]] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
authorization_endpoint = self.authorization_endpoint
id_token_signing_alg_values_supported = self.id_token_signing_alg_values_supported
issuer = self.issuer
jwks_uri = self.jwks_uri
response_types_supported = self.response_types_supported
subject_types_supported = self.subject_types_supported
token_endpoint = self.token_endpoint
backchannel_logout_session_supported = self.backchannel_logout_session_supported
backchannel_logout_supported = self.backchannel_logout_supported
claims_parameter_supported = self.claims_parameter_supported
claims_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.claims_supported, Unset):
claims_supported = self.claims_supported
end_session_endpoint = self.end_session_endpoint
frontchannel_logout_session_supported = self.frontchannel_logout_session_supported
frontchannel_logout_supported = self.frontchannel_logout_supported
grant_types_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_types_supported, Unset):
grant_types_supported = self.grant_types_supported
registration_endpoint = self.registration_endpoint
request_object_signing_alg_values_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.request_object_signing_alg_values_supported, Unset):
request_object_signing_alg_values_supported = self.request_object_signing_alg_values_supported
request_parameter_supported = self.request_parameter_supported
request_uri_parameter_supported = self.request_uri_parameter_supported
require_request_uri_registration = self.require_request_uri_registration
response_modes_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.response_modes_supported, Unset):
response_modes_supported = self.response_modes_supported
revocation_endpoint = self.revocation_endpoint
scopes_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.scopes_supported, Unset):
scopes_supported = self.scopes_supported
token_endpoint_auth_methods_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.token_endpoint_auth_methods_supported, Unset):
token_endpoint_auth_methods_supported = self.token_endpoint_auth_methods_supported
userinfo_endpoint = self.userinfo_endpoint
userinfo_signing_alg_values_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.userinfo_signing_alg_values_supported, Unset):
userinfo_signing_alg_values_supported = self.userinfo_signing_alg_values_supported
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"authorization_endpoint": authorization_endpoint,
"id_token_signing_alg_values_supported": id_token_signing_alg_values_supported,
"issuer": issuer,
"jwks_uri": jwks_uri,
"response_types_supported": response_types_supported,
"subject_types_supported": subject_types_supported,
"token_endpoint": token_endpoint,
}
)
if backchannel_logout_session_supported is not UNSET:
field_dict["backchannel_logout_session_supported"] = backchannel_logout_session_supported
if backchannel_logout_supported is not UNSET:
field_dict["backchannel_logout_supported"] = backchannel_logout_supported
if claims_parameter_supported is not UNSET:
field_dict["claims_parameter_supported"] = claims_parameter_supported
if claims_supported is not UNSET:
field_dict["claims_supported"] = claims_supported
if end_session_endpoint is not UNSET:
field_dict["end_session_endpoint"] = end_session_endpoint
if frontchannel_logout_session_supported is not UNSET:
field_dict["frontchannel_logout_session_supported"] = frontchannel_logout_session_supported
if frontchannel_logout_supported is not UNSET:
field_dict["frontchannel_logout_supported"] = frontchannel_logout_supported
if grant_types_supported is not UNSET:
field_dict["grant_types_supported"] = grant_types_supported
if registration_endpoint is not UNSET:
field_dict["registration_endpoint"] = registration_endpoint
if request_object_signing_alg_values_supported is not UNSET:
field_dict["request_object_signing_alg_values_supported"] = request_object_signing_alg_values_supported
if request_parameter_supported is not UNSET:
field_dict["request_parameter_supported"] = request_parameter_supported
if request_uri_parameter_supported is not UNSET:
field_dict["request_uri_parameter_supported"] = request_uri_parameter_supported
if require_request_uri_registration is not UNSET:
field_dict["require_request_uri_registration"] = require_request_uri_registration
if response_modes_supported is not UNSET:
field_dict["response_modes_supported"] = response_modes_supported
if revocation_endpoint is not UNSET:
field_dict["revocation_endpoint"] = revocation_endpoint
if scopes_supported is not UNSET:
field_dict["scopes_supported"] = scopes_supported
if token_endpoint_auth_methods_supported is not UNSET:
field_dict["token_endpoint_auth_methods_supported"] = token_endpoint_auth_methods_supported
if userinfo_endpoint is not UNSET:
field_dict["userinfo_endpoint"] = userinfo_endpoint
if userinfo_signing_alg_values_supported is not UNSET:
field_dict["userinfo_signing_alg_values_supported"] = userinfo_signing_alg_values_supported
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
authorization_endpoint = _d.pop("authorization_endpoint")
id_token_signing_alg_values_supported = cast(List[str], _d.pop("id_token_signing_alg_values_supported"))
issuer = _d.pop("issuer")
jwks_uri = _d.pop("jwks_uri")
response_types_supported = cast(List[str], _d.pop("response_types_supported"))
subject_types_supported = cast(List[str], _d.pop("subject_types_supported"))
token_endpoint = _d.pop("token_endpoint")
backchannel_logout_session_supported = _d.pop("backchannel_logout_session_supported", UNSET)
backchannel_logout_supported = _d.pop("backchannel_logout_supported", UNSET)
claims_parameter_supported = _d.pop("claims_parameter_supported", UNSET)
claims_supported = cast(List[str], _d.pop("claims_supported", UNSET))
end_session_endpoint = _d.pop("end_session_endpoint", UNSET)
frontchannel_logout_session_supported = _d.pop("frontchannel_logout_session_supported", UNSET)
frontchannel_logout_supported = _d.pop("frontchannel_logout_supported", UNSET)
grant_types_supported = cast(List[str], _d.pop("grant_types_supported", UNSET))
registration_endpoint = _d.pop("registration_endpoint", UNSET)
request_object_signing_alg_values_supported = cast(
List[str], _d.pop("request_object_signing_alg_values_supported", UNSET)
)
request_parameter_supported = _d.pop("request_parameter_supported", UNSET)
request_uri_parameter_supported = _d.pop("request_uri_parameter_supported", UNSET)
require_request_uri_registration = _d.pop("require_request_uri_registration", UNSET)
response_modes_supported = cast(List[str], _d.pop("response_modes_supported", UNSET))
revocation_endpoint = _d.pop("revocation_endpoint", UNSET)
scopes_supported = cast(List[str], _d.pop("scopes_supported", UNSET))
token_endpoint_auth_methods_supported = cast(List[str], _d.pop("token_endpoint_auth_methods_supported", UNSET))
userinfo_endpoint = _d.pop("userinfo_endpoint", UNSET)
userinfo_signing_alg_values_supported = cast(List[str], _d.pop("userinfo_signing_alg_values_supported", UNSET))
well_known = cls(
authorization_endpoint=authorization_endpoint,
id_token_signing_alg_values_supported=id_token_signing_alg_values_supported,
issuer=issuer,
jwks_uri=jwks_uri,
response_types_supported=response_types_supported,
subject_types_supported=subject_types_supported,
token_endpoint=token_endpoint,
backchannel_logout_session_supported=backchannel_logout_session_supported,
backchannel_logout_supported=backchannel_logout_supported,
claims_parameter_supported=claims_parameter_supported,
claims_supported=claims_supported,
end_session_endpoint=end_session_endpoint,
frontchannel_logout_session_supported=frontchannel_logout_session_supported,
frontchannel_logout_supported=frontchannel_logout_supported,
grant_types_supported=grant_types_supported,
registration_endpoint=registration_endpoint,
request_object_signing_alg_values_supported=request_object_signing_alg_values_supported,
request_parameter_supported=request_parameter_supported,
request_uri_parameter_supported=request_uri_parameter_supported,
require_request_uri_registration=require_request_uri_registration,
response_modes_supported=response_modes_supported,
revocation_endpoint=revocation_endpoint,
scopes_supported=scopes_supported,
token_endpoint_auth_methods_supported=token_endpoint_auth_methods_supported,
userinfo_endpoint=userinfo_endpoint,
userinfo_signing_alg_values_supported=userinfo_signing_alg_values_supported,
)
well_known.additional_properties = _d
return well_known
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties