Skip to content

Commit 9dfa40c

Browse files
authored
Merge pull request #639 from oauthlib/3-release
3.0.0 ChangeLog release
2 parents b79b551 + fa0b154 commit 9dfa40c

File tree

8 files changed

+320
-17
lines changed

8 files changed

+320
-17
lines changed

CHANGELOG.rst

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,57 @@
11
Changelog
22
=========
33

4-
Unreleased
4+
3.0.0 (2019-01-01)
55
------------------
6+
OAuth2.0 Provider - outstanding Features
67

8+
* OpenID Connect Core support
9+
* RFC7662 Introspect support
10+
* RFC8414 OAuth2.0 Authorization Server Metadata support (#605)
11+
* RFC7636 PKCE support (#617 #624)
12+
13+
OAuth2.0 Provider - API/Breaking Changes
14+
15+
* Add "request" to confirm_redirect_uri #504
16+
* confirm_redirect_uri/get_default_redirect_uri has a bit changed #445
17+
* invalid_client is now a FatalError #606
18+
* Changed errors status code from 401 to 400:
19+
- invalid_grant: #264
20+
- invalid_scope: #620
21+
- access_denied/unauthorized_client/consent_required/login_required #623
22+
- 401 must have WWW-Authenticate HTTP Header set. #623
23+
24+
OAuth2.0 Provider - Bugfixes
25+
26+
* empty scopes no longer raise exceptions for implicit and authorization_code #475 / #406
27+
28+
OAuth2.0 Client - Bugfixes / Changes:
29+
30+
* expires_in in Implicit flow is now an integer #569
31+
* expires is no longer overriding expires_in #506
32+
* parse_request_uri_response is now required #499
33+
* Unknown error=xxx raised by OAuth2 providers was not understood #431
734
* OAuth2's `prepare_token_request` supports sending an empty string for `client_id` (#585)
835
* OAuth2's `WebApplicationClient.prepare_request_body` was refactored to better
936
support sending or omitting the `client_id` via a new `include_client_id` kwarg.
1037
By default this is included. The method will also emit a DeprecationWarning if
1138
a `client_id` parameter is submitted; the already configured `self.client_id`
1239
is the preferred option. (#585)
1340

41+
OAuth1.0 Client:
42+
43+
* Support for HMAC-SHA256 #498
44+
45+
General fixes:
46+
47+
* $ and ' are allowed to be unencoded in query strings #564
48+
* Request attributes are no longer overriden by HTTP Headers #409
49+
* Removed unnecessary code for handling python2.6
50+
* Add support of python3.7 #621
51+
* Several minors updates to setup.py and tox
52+
* Set pytest as the default unittest framework
53+
54+
1455
2.1.0 (2018-05-21)
1556
------------------
1657

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2018 The OAuthlib Community
1+
Copyright (c) 2019 The OAuthlib Community
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXOPTS =
5+
SPHINXOPTS = -v
66
SPHINXBUILD = sphinx-build
77
PAPER =
88
BUILDDIR = _build

docs/conf.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
# -- General configuration -----------------------------------------------------
2222

2323
# If your documentation needs a minimal Sphinx version, state it here.
24-
#needs_sphinx = '1.0'
24+
needs_sphinx = '1.1'
2525

2626
# Add any Sphinx extension module names here, as strings. They can be extensions
2727
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.viewcode']
28+
extensions = [
29+
'sphinx.ext.autodoc',
30+
'sphinx.ext.doctest',
31+
'sphinx.ext.viewcode',
32+
'sphinx.ext.graphviz'
33+
]
2934

3035
# Add any paths that contain templates here, relative to this directory.
3136
templates_path = ['_templates']
@@ -41,7 +46,7 @@
4146

4247
# General information about the project.
4348
project = u'OAuthLib'
44-
copyright = u'2018, The OAuthlib Community'
49+
copyright = u'2019, The OAuthlib Community'
4550

4651
# The version info for the project you're documenting, acts as replacement for
4752
# |version| and |release|, also used in various other places throughout the
@@ -186,7 +191,7 @@
186191
# (source start file, target name, title, author, documentclass [howto/manual]).
187192
latex_documents = [
188193
('index', 'OAuthLib.tex', u'OAuthLib Documentation',
189-
u'Idan Gazit and the Python Community', 'manual'),
194+
u'The OAuhthlib Community', 'manual'),
190195
]
191196

192197
# The name of an image file (relative to this directory) to place at the top of
@@ -216,7 +221,7 @@
216221
# (source start file, name, description, authors, manual section).
217222
man_pages = [
218223
('index', 'oauthlib', u'OAuthLib Documentation',
219-
[u'Idan Gazit and the Python Community'], 1)
224+
[u'The OAuthlib Community'], 1)
220225
]
221226

222227
# If true, show URL addresses after external links.
@@ -230,7 +235,7 @@
230235
# dir menu entry, description, category)
231236
texinfo_documents = [
232237
('index', 'OAuthLib', u'OAuthLib Documentation',
233-
u'Idan Gazit and the Python Community', 'OAuthLib', 'One line description of project.',
238+
u'The OAuthlib Community', 'OAuthLib', 'One line description of project.',
234239
'Miscellaneous'),
235240
]
236241

docs/oauth2/oauth2provider-legend.dot

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
digraph oauthlib_legend {
2+
3+
subgraph cluster_legend {
4+
label="Legend";
5+
6+
/*
7+
method [ shape=record; label="{{RequestValidator\nmethod name|arguments}|return values}" ];
8+
endpoint [ shape=record; label="{Endpoint name|{function name|arguments}|grant type}" ];
9+
webframework [ shape=hexagon; label="Upstream functions" ];
10+
*/
11+
12+
flow_code_token [shape=none,label="Authorization Code\nAccess Token Request"];
13+
flow_code_auth [shape=none,label="Authorization Code\nAuthorization Request"];
14+
flow_implicit [shape=none,label="Implicit Grant"];
15+
flow_password [shape=none,label="Resource Owner Password\nCredentials Grant"];
16+
flow_clicreds [shape=none,label="Client Credentials Grant"];
17+
flow_refresh [shape=none,label="Refresh Grant"];
18+
flow_introspect [shape=none,label="Token Introspection"];
19+
flow_revoke [shape=none,label="Token Revoke"];
20+
flow_resource [shape=none,label="Resource Access"];
21+
flow_code_token -> a [style=bold,color=green];
22+
flow_code_auth -> b [style=bold,color=darkgreen];
23+
flow_implicit -> c [style=bold,color=orange];
24+
flow_password -> d [style=bold,color=red];
25+
flow_clicreds -> e [style=bold,color=blue];
26+
flow_refresh -> f [style=bold,color=brown];
27+
flow_introspect -> g [style=bold,color=yellow];
28+
flow_revoke -> h [style=bold,color=purple];
29+
flow_resource -> i [style=bold,color=pink];
30+
a, b, c, d, e, f, g, h, i [shape=none,label=""];
31+
}
32+
}

docs/oauth2/oauth2provider-server.dot

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
digraph oauthlib {
2+
center="1"
3+
edge [ style=bold ];
4+
5+
/* Web Framework Entry and Exit points */
6+
{
7+
node [ shape=hexagon ];
8+
edge [ style=normal ];
9+
10+
webapi_request [ label="WebFramework\nHTTP request" ];
11+
webapi_request:s ->
12+
endpoint_authorize:top:n,
13+
endpoint_token:top:n,
14+
endpoint_introspect:top:n,
15+
endpoint_revoke:top:n,
16+
endpoint_resource:top:n;
17+
webapi_response [ label="WebFramework\nHTTP response" ];
18+
}
19+
20+
/* OAuthlib Endpoints */
21+
{
22+
rank=same;
23+
24+
endpoint_authorize [ shape=record; label="{<top>Authorize Endpoint|{create_authorize_response|{uri|method|body|headers|credentials}}|{<token>token|<code>code}}" ];
25+
endpoint_token [ shape=record; label="{<top>Token Endpoint|{create_token_response|{uri|method|body|headers|credentials}}|{<authorization_code>authorization_code|<password>password|<client_credentials>client_credentials|<refresh_token>refresh_token}}" ];
26+
endpoint_revoke [ shape=record; label="{<top>Revocation Endpoint|{create_revocation_response|{uri|method|body|headers}}}" ];
27+
endpoint_introspect [ shape=record; label="{<top>Introspect Endpoint|{create_introspect_response|{uri|method|body|headers}}}" ];
28+
endpoint_resource [ shape=record; label="{<top>Resource Endpoint|{verify_request|{uri|method|body|headers|scopes_list}}}" ];
29+
}
30+
31+
/* OAuthlib RequestValidator Methods */
32+
{
33+
node [ shape=record ];
34+
35+
f_client_authentication_required [ label="{{<top>client_authentication_required|request}|{<true>True|<false>False}}"; ];
36+
f_authenticate_client [ label="{{<top>authenticate_client|request}|{<true>True|<false>False}}";];
37+
f_authenticate_client_id [ label="{{<top>authenticate_client_id|{client_id|request}}|{<true>True|<false>False}}"; ];
38+
f_validate_grant_type [ label="{{<top>validate_grant_type|{client_id|grant_type|client|request}}|{<true>True|<false>False}}"; ];
39+
f_validate_code [ label="{{<top>validate_code|{client_id|code|request}}|{<true>True|<false>False}}"; ];
40+
f_confirm_redirect_uri [ label="{{<top>confirm_redirect_uri|{client_id|code|redirect_uri|client|request}}|{<true>True|<false>False}}"; ];
41+
f_get_default_redirect_uri [ label="{{<top>get_default_redirect_uri|{client_id|request}}|{<redirect_uri>redirect_uri|<none>None}}"; ];
42+
f_invalidate_authorization_code [ label="{{<top>invalidate_authorization_code|{client_id|code|request}}|None}"; ];
43+
f_validate_scopes [ label="{{<top>validate_scopes|{client_id|scopes|client|request}}|{<true>True|<false>False}}"; ];
44+
f_save_bearer_token [ label="{{<top>save_bearer_token|{token|request}}|None}"; ];
45+
f_revoke_token [ label="{{<top>revoke_token|{token|token_type_hint|request}}|None}"; ];
46+
f_validate_client_id [ label="{{<top>validate_client_id|{client_id|request}}|{<true>True|<false>False}}"; ];
47+
f_validate_redirect_uri [ label="{{<top>validate_redirect_uri|{client_id|redirect_uri|request}}|{<true>True|<false>False}}"; ];
48+
f_is_pkce_required [ label="{{<top>is_pkce_required|{client_id|request}}|{<true>True|<false>False}}"; ];
49+
f_validate_response_type [ label="{{<top>validate_response_type|{client_id|response_type|client|request}}|{<true>True|<false>False}}"; ];
50+
f_save_authorization_code [ label="{{<top>save_authorization_code|{client_id|code|request}}|None}"; ];
51+
f_validate_bearer_token [ label="{{<top>validate_bearer_token|{token|scopes|request}}|{<true>True|<false>False}}"; ];
52+
f_validate_refresh_token [ label="{{<top>validate_refresh_token|{refresh_token|client|request}}|{<true>True|<false>False}}"; ];
53+
f_get_default_scopes [ label="{{<top>get_default_scopes|{client_id|request}}|{<scopes>[scopes]}}"; ];
54+
f_get_original_scopes [ label="{{<top>get_original_scopes|{refresh_token|request}}|{<scopes>[scopes]}}"; ];
55+
f_is_within_original_scope [ label="{{<top>is_within_original_scope|{refresh_scopes|refresh_token|request}}|{<true>True|<false>False}}"; ];
56+
f_validate_user [ label="{{<top>validate_user|{username|password|client|request}}|{<true>True|<false>False}}"; ];
57+
f_introspect_token [ label="{{<top>introspect_token|{token|token_type_hint|request}}|{<claims>\{claims\}|<none>None}}"; ];
58+
}
59+
60+
/* OAuthlib Conditions */
61+
62+
if_code_challenge [ label="if code_challenge"; ];
63+
if_redirect_uri [ label="if redirect_uri"; ];
64+
if_redirect_uri_present [ shape=none;label="present"; ];
65+
if_redirect_uri_missing [ shape=none;label="missing"; ];
66+
if_scopes [ label="if scopes"; ];
67+
if_all [ label="all(request_scopes not in scopes)"; ];
68+
69+
/* OAuthlib errors */
70+
e_normal [ shape=none,label="ERROR" ];
71+
72+
/* Authorization Code - Access Token Request */
73+
{
74+
edge [ color=green ];
75+
76+
endpoint_token:authorization_code:s -> f_client_authentication_required;
77+
f_client_authentication_required:true:s -> f_authenticate_client;
78+
f_client_authentication_required:false -> f_authenticate_client_id;
79+
f_authenticate_client:true:s -> f_validate_grant_type;
80+
f_authenticate_client_id:true:s -> f_validate_grant_type;
81+
f_validate_grant_type:true:s -> f_validate_code;
82+
83+
f_validate_code:true:s -> if_redirect_uri;
84+
if_redirect_uri -> if_redirect_uri_present [ arrowhead=none ];
85+
if_redirect_uri -> if_redirect_uri_missing [ arrowhead=none ];
86+
if_redirect_uri_present -> f_confirm_redirect_uri;
87+
if_redirect_uri_missing -> f_get_default_redirect_uri;
88+
89+
f_confirm_redirect_uri:true:s -> f_save_bearer_token;
90+
f_get_default_redirect_uri -> f_save_bearer_token;
91+
92+
f_save_bearer_token -> f_invalidate_authorization_code;
93+
f_invalidate_authorization_code -> webapi_response;
94+
}
95+
/* Authorization Code - Authorization Request */
96+
{
97+
edge [ color=darkgreen ];
98+
99+
endpoint_authorize:code:s -> f_validate_client_id;
100+
f_validate_client_id:true:s -> if_redirect_uri;
101+
if_redirect_uri -> if_redirect_uri_present [ arrowhead=none ];
102+
if_redirect_uri -> if_redirect_uri_missing [ arrowhead=none ];
103+
if_redirect_uri_present -> f_validate_redirect_uri;
104+
if_redirect_uri_missing -> f_get_default_redirect_uri;
105+
106+
f_validate_redirect_uri:true:s -> f_validate_response_type;
107+
f_get_default_redirect_uri -> f_validate_response_type;
108+
f_validate_response_type:true:s -> f_is_pkce_required;
109+
f_is_pkce_required:true:s -> if_code_challenge;
110+
f_is_pkce_required:false -> f_validate_scopes;
111+
112+
if_code_challenge -> f_validate_scopes [ label="present" ];
113+
if_code_challenge -> e_normal [ label="missing" ];
114+
115+
f_validate_scopes:true:s -> f_save_authorization_code;
116+
}
117+
118+
/* Implicit */
119+
{
120+
edge [ color=orange ];
121+
122+
endpoint_authorize:token:s -> f_validate_client_id;
123+
f_validate_client_id:true:s -> if_redirect_uri;
124+
if_redirect_uri -> if_redirect_uri_present [ arrowhead=none ];
125+
if_redirect_uri -> if_redirect_uri_missing [ arrowhead=none ];
126+
if_redirect_uri_present -> f_validate_redirect_uri;
127+
if_redirect_uri_missing -> f_get_default_redirect_uri;
128+
129+
f_validate_redirect_uri:true:s -> f_validate_response_type;
130+
f_get_default_redirect_uri -> f_validate_response_type;
131+
f_validate_response_type:true:s -> f_validate_scopes;
132+
f_validate_scopes:true:s -> f_save_bearer_token;
133+
}
134+
135+
/* Resource Owner Password Grant */
136+
{
137+
edge [ color=red ];
138+
139+
endpoint_token:password:s -> f_client_authentication_required;
140+
f_client_authentication_required:true:s -> f_authenticate_client;
141+
f_client_authentication_required:false -> f_authenticate_client_id;
142+
f_authenticate_client:true:s -> f_validate_user;
143+
f_authenticate_client_id:true:s -> f_validate_user;
144+
f_validate_user:true:s -> f_validate_grant_type;
145+
146+
f_validate_grant_type:true:s -> if_scopes;
147+
if_scopes -> f_validate_scopes [ label="present" ];
148+
if_scopes -> f_get_default_scopes [ label="missing" ];
149+
150+
f_validate_scopes:true:s -> f_save_bearer_token;
151+
f_get_default_scopes -> f_save_bearer_token;
152+
f_save_bearer_token -> webapi_response;
153+
}
154+
155+
/* Client Credentials Grant */
156+
{
157+
edge [ color=blue ];
158+
159+
endpoint_token:client_credentials:s -> f_authenticate_client;
160+
f_authenticate_client -> f_validate_grant_type;
161+
f_validate_grant_type:true:s -> f_validate_scopes;
162+
f_validate_scopes:true:s -> f_save_bearer_token;
163+
f_save_bearer_token -> webapi_response;
164+
}
165+
166+
/* Refresh Grant */
167+
{
168+
edge [ color=brown ];
169+
170+
endpoint_token:refresh_token:s -> f_client_authentication_required;
171+
f_client_authentication_required:true:s -> f_authenticate_client;
172+
f_client_authentication_required:false -> f_authenticate_client_id;
173+
f_authenticate_client:true:s -> f_validate_grant_type;
174+
f_authenticate_client_id:true:s -> f_validate_grant_type;
175+
f_validate_grant_type:true:s -> f_validate_refresh_token;
176+
f_validate_refresh_token:true:s -> f_get_original_scopes;
177+
f_get_original_scopes -> if_all;
178+
if_all -> f_is_within_original_scope [ label="True" ];
179+
if_all -> f_save_bearer_token [ label="False" ];
180+
f_is_within_original_scope:true:s -> f_save_bearer_token;
181+
f_save_bearer_token -> webapi_response;
182+
}
183+
184+
/* Introspect Endpoint */
185+
{
186+
edge [ color=yellow ];
187+
188+
endpoint_introspect:s -> f_client_authentication_required [ label="" ];
189+
f_client_authentication_required:true:s -> f_authenticate_client;
190+
f_client_authentication_required:false -> f_authenticate_client_id;
191+
f_authenticate_client:true:s -> f_introspect_token;
192+
f_authenticate_client_id:true:s -> f_introspect_token;
193+
f_introspect_token:claims -> webapi_response;
194+
}
195+
196+
/* Revocation Endpoint */
197+
{
198+
edge [ color=purple ];
199+
200+
endpoint_revoke:s -> f_client_authentication_required;
201+
f_client_authentication_required:true:s -> f_authenticate_client;
202+
f_client_authentication_required:false -> f_authenticate_client_id;
203+
f_authenticate_client:true:s -> f_revoke_token;
204+
f_authenticate_client_id:true:s -> f_revoke_token;
205+
f_revoke_token:s -> webapi_response;
206+
}
207+
208+
/* Resource Access - Verify Request */
209+
{
210+
edge [ color=pink ];
211+
212+
endpoint_resource:s -> f_validate_bearer_token;
213+
f_validate_bearer_token:true -> webapi_response;
214+
}
215+
}

0 commit comments

Comments
 (0)