summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Huot <jonathan.huot@thomsonreuters.com>2019-03-26 14:50:55 +0100
committerJonathan Huot <jonathan.huot@thomsonreuters.com>2019-03-26 14:50:55 +0100
commit4877b4837a9355bc74c9f3d59343d689be4c86fa (patch)
treec1b8f885f4fa0e5a1ab5c6299a3abef9db41696c
parent53d3d335879f205ae705d93420f34984073cd5a1 (diff)
downloadoauthlib-4877b4837a9355bc74c9f3d59343d689be4c86fa.tar.gz
Use native operator instead type conversion
-rw-r--r--oauthlib/openid/connect/core/grant_types/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/oauthlib/openid/connect/core/grant_types/base.py b/oauthlib/openid/connect/core/grant_types/base.py
index 31ff82e..c5d91e7 100644
--- a/oauthlib/openid/connect/core/grant_types/base.py
+++ b/oauthlib/openid/connect/core/grant_types/base.py
@@ -74,7 +74,7 @@ class GrantTypeBase(object):
LDktKdoQak3Pk0cnXxCltA
"""
digest = hashfunc(value.encode()).digest()
- left_most = int(len(digest) / 2)
+ left_most = len(digest) // 2
return base64.urlsafe_b64encode(digest[:left_most]).decode().rstrip("=")
def add_id_token(self, token, token_handler, request, nonce=None):