From ef23700256eeca59f440cbe3fbc35bd14b5313e9 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 25 Jan 2019 18:31:52 +0530 Subject: [PATCH] update(frappe): Update dependency Oauthlib (#6832) Update dependency oauthlib to 3.0.0 updates interdependent lib requests-oauthlib to 1.2.0 --- frappe/oauth.py | 9 +-------- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/frappe/oauth.py b/frappe/oauth.py index e89a13cd0e..f529694407 100644 --- a/frappe/oauth.py +++ b/frappe/oauth.py @@ -5,7 +5,7 @@ import pytz from frappe import _ from frappe.auth import LoginManager from oauthlib.oauth2.rfc6749.tokens import BearerToken -from oauthlib.oauth2.rfc6749.grant_types import AuthorizationCodeGrant, ImplicitGrant, ResourceOwnerPasswordCredentialsGrant, ClientCredentialsGrant, RefreshTokenGrant, OpenIDConnectAuthCode +from oauthlib.oauth2.rfc6749.grant_types import AuthorizationCodeGrant, ImplicitGrant, ResourceOwnerPasswordCredentialsGrant, ClientCredentialsGrant, RefreshTokenGrant from oauthlib.oauth2 import RequestValidator from oauthlib.oauth2.rfc6749.endpoints.authorization import AuthorizationEndpoint from oauthlib.oauth2.rfc6749.endpoints.token import TokenEndpoint @@ -40,19 +40,12 @@ class WebApplicationServer(AuthorizationEndpoint, TokenEndpoint, ResourceEndpoin implicit_grant = ImplicitGrant(request_validator) auth_grant = AuthorizationCodeGrant(request_validator) refresh_grant = RefreshTokenGrant(request_validator) - openid_connect_auth = OpenIDConnectAuthCode(request_validator) resource_owner_password_credentials_grant = ResourceOwnerPasswordCredentialsGrant(request_validator) bearer = BearerToken(request_validator, token_generator, token_expires_in, refresh_token_generator) AuthorizationEndpoint.__init__(self, default_response_type='code', response_types={ 'code': auth_grant, - 'code+token': openid_connect_auth, - 'code+id_token': openid_connect_auth, - 'code+token+id_token': openid_connect_auth, - 'code token': openid_connect_auth, - 'code id_token': openid_connect_auth, - 'code token id_token': openid_connect_auth, 'token': implicit_grant }, default_token_type=bearer) diff --git a/requirements.txt b/requirements.txt index a348147030..e484ccadc5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,8 +34,8 @@ ndg-httpsclient pyasn1 zxcvbn-python unittest-xml-reporting -oauthlib==2.1.0 -requests-oauthlib==1.1.0 +oauthlib==3.0.0 +requests-oauthlib==1.2.0 pdfkit PyJWT PyPDF2