better docstrings

This commit is contained in:
niphlod
2015-12-30 14:55:37 +01:00
parent e94946d3d5
commit d4bca008a8
+3 -3
View File
@@ -4035,13 +4035,13 @@ class Auth(object):
def jwt(self): def jwt(self):
""" """
To use JWT authentication: To use JWT authentication:
1) instantiate auth with 1) instantiate auth with::
auth = Auth(db, jwt = {'secret_key':'secret'}) auth = Auth(db, jwt = {'secret_key':'secret'})
where 'secret' is your own secret string. where 'secret' is your own secret string.
2) Secorate functions that require login but should accept the JWT token credentials: 2) Decorate functions that require login but should accept the JWT token credentials::
@auth.allows_jwt() @auth.allows_jwt()
@auth.requires_login() @auth.requires_login()
@@ -4064,7 +4064,7 @@ class Auth(object):
Authorization: Bearer <the jwt token> Authorization: Bearer <the jwt token>
Any additional attributes in the jwt argument of Auth() below: Any additional attributes in the jwt argument of Auth() below::
auth = Auth(db, jwt = {...}) auth = Auth(db, jwt = {...})