Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1677)

Unified Diff: appengine/components/components/auth/tokens.py

Issue 2854853005: auth: Stop mentioning 'global' secrets in API. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/components/components/auth/tokens.py
diff --git a/appengine/components/components/auth/tokens.py b/appengine/components/components/auth/tokens.py
index 2bf6d13047ce633c1f139dca95be69ce88ee2a10..2bbbe2a705566e3b8aba86a7d60a42d9a22ebdd4 100644
--- a/appengine/components/components/auth/tokens.py
+++ b/appengine/components/components/auth/tokens.py
@@ -42,7 +42,7 @@ class TokenKind(object):
1) Define token class, configuring its expiration, name of a secret:
class MyToken(auth.TokenKind):
expiration_sec = 3600
- secret_key = auth.SecretKey('my_secret', scope='local')
+ secret_key = auth.SecretKey('my_secret')
2) Use it to generate a token that embeds and\or signs some data:
token = MyToken.generate('message to authenticate', {'data': 'public'})

Powered by Google App Engine
This is Rietveld 408576698