aboutsummaryrefslogtreecommitdiff
path: root/oauth2client/contrib/xsrfutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'oauth2client/contrib/xsrfutil.py')
-rw-r--r--oauth2client/contrib/xsrfutil.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/oauth2client/contrib/xsrfutil.py b/oauth2client/contrib/xsrfutil.py
index 7c3ec03..c03e679 100644
--- a/oauth2client/contrib/xsrfutil.py
+++ b/oauth2client/contrib/xsrfutil.py
@@ -20,7 +20,12 @@ import hmac
import time
from oauth2client import _helpers
+from oauth2client import util
+__authors__ = [
+ '"Doug Coker" <dcoker@google.com>',
+ '"Joe Gregorio" <jcgregorio@google.com>',
+]
# Delimiter character
DELIMITER = b':'
@@ -29,7 +34,7 @@ DELIMITER = b':'
DEFAULT_TIMEOUT_SECS = 60 * 60
-@_helpers.positional(2)
+@util.positional(2)
def generate_token(key, user_id, action_id='', when=None):
"""Generates a URL-safe token for the given user, action, time tuple.
@@ -57,7 +62,7 @@ def generate_token(key, user_id, action_id='', when=None):
return token
-@_helpers.positional(3)
+@util.positional(3)
def validate_token(key, token, user_id, action_id="", current_time=None):
"""Validates that the given token authorizes the user for the action.