oidcauth-py 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
oidcauth/__init__.py ADDED
@@ -0,0 +1,133 @@
1
+ """OpenID Connect relying party for browser login: authorization code flow with
2
+ PKCE, state and nonce, an encrypted flow cookie, ID token verification,
3
+ refresh, revocation, RP-initiated and back-channel logout.
4
+
5
+ The library verifies the provider response and returns an Identity. It does not
6
+ touch the user table and does not issue session tokens: what to do with the
7
+ identity (link, provision, reject) and how to keep the user signed in is the
8
+ application's decision.
9
+
10
+ See ``oidcauth.fastapi`` for the FastAPI/Starlette adapter,
11
+ ``oidcauth.testing`` for a fake provider and ``oidcauth.zitadel`` for
12
+ Zitadel's headless identity provider login.
13
+ """
14
+
15
+ from .client import (
16
+ BACKCHANNEL_LOGOUT_EVENT,
17
+ Client,
18
+ LoginOptions,
19
+ LogoutToken,
20
+ RefreshResult,
21
+ Result,
22
+ )
23
+ from .config import (
24
+ AUTH_METHOD_AUTO,
25
+ AUTH_METHOD_CLIENT_SECRET_BASIC,
26
+ AUTH_METHOD_CLIENT_SECRET_POST,
27
+ AUTH_METHOD_NONE,
28
+ AUTH_METHOD_PRIVATE_KEY_JWT,
29
+ DEFAULT_SCOPES,
30
+ Config,
31
+ )
32
+ from .errors import (
33
+ ConfigError,
34
+ DiscoveryError,
35
+ InvalidLogoutTokenError,
36
+ InvalidStateError,
37
+ MissingCodeError,
38
+ NotSupportedError,
39
+ OIDCAuthError,
40
+ ProviderError,
41
+ ProviderUnreachableError,
42
+ TicketNotFoundError,
43
+ TokenError,
44
+ UserInfoError,
45
+ is_user_error,
46
+ )
47
+ from .flow import Cookie
48
+ from .helpers import MemoryTicketStore, RedisTicketStore, TicketStore, safe_return_to
49
+ from .identity import Address, Identity, Tokens, default_role_extractor
50
+ from .scopes import (
51
+ DISPLAY_PAGE,
52
+ DISPLAY_POPUP,
53
+ DISPLAY_TOUCH,
54
+ DISPLAY_WAP,
55
+ PROMPT_CONSENT,
56
+ PROMPT_CREATE,
57
+ PROMPT_LOGIN,
58
+ PROMPT_NONE,
59
+ PROMPT_SELECT_ACCOUNT,
60
+ RESPONSE_MODE_FORM_POST,
61
+ RESPONSE_MODE_QUERY,
62
+ SCOPE_ADDRESS,
63
+ SCOPE_EMAIL,
64
+ SCOPE_OFFLINE_ACCESS,
65
+ SCOPE_OPENID,
66
+ SCOPE_PHONE,
67
+ SCOPE_PROFILE,
68
+ TOKEN_TYPE_HINT_ACCESS,
69
+ TOKEN_TYPE_HINT_REFRESH,
70
+ ClaimRequest,
71
+ ClaimsRequest,
72
+ )
73
+
74
+ __version__ = "0.1.0"
75
+
76
+ __all__ = [
77
+ "AUTH_METHOD_AUTO",
78
+ "AUTH_METHOD_CLIENT_SECRET_BASIC",
79
+ "AUTH_METHOD_CLIENT_SECRET_POST",
80
+ "AUTH_METHOD_NONE",
81
+ "AUTH_METHOD_PRIVATE_KEY_JWT",
82
+ "BACKCHANNEL_LOGOUT_EVENT",
83
+ "DEFAULT_SCOPES",
84
+ "DISPLAY_PAGE",
85
+ "DISPLAY_POPUP",
86
+ "DISPLAY_TOUCH",
87
+ "DISPLAY_WAP",
88
+ "PROMPT_CONSENT",
89
+ "PROMPT_CREATE",
90
+ "PROMPT_LOGIN",
91
+ "PROMPT_NONE",
92
+ "PROMPT_SELECT_ACCOUNT",
93
+ "RESPONSE_MODE_FORM_POST",
94
+ "RESPONSE_MODE_QUERY",
95
+ "SCOPE_ADDRESS",
96
+ "SCOPE_EMAIL",
97
+ "SCOPE_OFFLINE_ACCESS",
98
+ "SCOPE_OPENID",
99
+ "SCOPE_PHONE",
100
+ "SCOPE_PROFILE",
101
+ "TOKEN_TYPE_HINT_ACCESS",
102
+ "TOKEN_TYPE_HINT_REFRESH",
103
+ "Address",
104
+ "ClaimRequest",
105
+ "ClaimsRequest",
106
+ "Client",
107
+ "Config",
108
+ "ConfigError",
109
+ "Cookie",
110
+ "DiscoveryError",
111
+ "Identity",
112
+ "InvalidLogoutTokenError",
113
+ "InvalidStateError",
114
+ "LoginOptions",
115
+ "LogoutToken",
116
+ "MemoryTicketStore",
117
+ "MissingCodeError",
118
+ "NotSupportedError",
119
+ "OIDCAuthError",
120
+ "ProviderError",
121
+ "ProviderUnreachableError",
122
+ "RedisTicketStore",
123
+ "RefreshResult",
124
+ "Result",
125
+ "TicketNotFoundError",
126
+ "TicketStore",
127
+ "TokenError",
128
+ "Tokens",
129
+ "UserInfoError",
130
+ "default_role_extractor",
131
+ "is_user_error",
132
+ "safe_return_to",
133
+ ]