summaryrefslogtreecommitdiff
path: root/oauthlib/common.py
diff options
context:
space:
mode:
authorjturmel <jturmel@gmail.com>2014-03-29 23:33:26 -0500
committerjturmel <jturmel@gmail.com>2014-03-29 23:33:26 -0500
commit5d0fc1182f6d9826764cc43ade99bc5e5a81c711 (patch)
tree507668de5c1dabd7309982304477698aee72ed63 /oauthlib/common.py
parent14f687b7355df142ea76145dea53bcbe7d012fdc (diff)
downloadoauthlib-5d0fc1182f6d9826764cc43ade99bc5e5a81c711.tar.gz
Changes per PR comments
* Rename methods from crypto to signed * Since generating a signed token to be used as a refresh token could be a bit overkill in terms of length/storage, allow setting of refresh token generator separately, or it defaults to whatever the other token generator was set to * Simplify tests per PR comments
Diffstat (limited to 'oauthlib/common.py')
-rw-r--r--oauthlib/common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/oauthlib/common.py b/oauthlib/common.py
index 831f9eb..d9d56b3 100644
--- a/oauthlib/common.py
+++ b/oauthlib/common.py
@@ -235,7 +235,7 @@ def generate_token(length=30, chars=UNICODE_ASCII_CHARACTER_SET):
return ''.join(rand.choice(chars) for x in range(length))
-def generate_crypto_token(private_pem, request):
+def generate_signed_token(private_pem, request):
import Crypto.PublicKey.RSA as RSA
import jwt
@@ -256,7 +256,7 @@ def generate_crypto_token(private_pem, request):
return token
-def verify_crypto_token(private_pem, token):
+def verify_signed_token(private_pem, token):
import Crypto.PublicKey.RSA as RSA
import jwt