diff --git a/openstack_auth/user.py b/openstack_auth/user.py index 132e37be..1f9db7a6 100644 --- a/openstack_auth/user.py +++ b/openstack_auth/user.py @@ -233,8 +233,7 @@ class User(models.AnonymousUser): Returns ``True`` if the token is expired, ``False`` if not, and ``None`` if there is no token set. - .. param:: margin - + :param margin: A security time margin in seconds before real expiration. Will return ``True`` if the token expires in less than ``margin`` seconds of time. @@ -249,8 +248,7 @@ class User(models.AnonymousUser): def is_authenticated(self, margin=None): """Checks for a valid authentication. - .. param:: margin - + :param margin: A security time margin in seconds before end of authentication. Will return ``False`` if authentication ends in less than ``margin`` seconds of time. @@ -266,8 +264,7 @@ class User(models.AnonymousUser): Returns ``True`` if not authenticated,``False`` otherwise. - .. param:: margin - + :param margin: A security time margin in seconds before end of an eventual authentication. Will return ``True`` even if authenticated but that authentication diff --git a/openstack_auth/utils.py b/openstack_auth/utils.py index 358f7725..c13a84b8 100644 --- a/openstack_auth/utils.py +++ b/openstack_auth/utils.py @@ -80,12 +80,9 @@ def is_token_valid(token, margin=None): Returns ``True`` if the token has not yet expired, otherwise ``False``. - .. param:: token - - The openstack_auth.user.Token instance to check - - .. param:: margin + :param token: The openstack_auth.user.Token instance to check + :param margin: A time margin in seconds to subtract from the real token's validity. An example usage is that the token can be valid once the middleware passed, and invalid (timed-out) during a view rendering and this diff --git a/openstack_auth/views.py b/openstack_auth/views.py index 469f4f5b..49814dbb 100644 --- a/openstack_auth/views.py +++ b/openstack_auth/views.py @@ -153,12 +153,11 @@ def websso(request): def logout(request, login_url=None, **kwargs): """Logs out the user if he is logged in. Then redirects to the log-in page. - .. param:: login_url + :param login_url: + Once logged out, defines the URL where to redirect after login - Once logged out, defines the URL where to redirect after login - - .. param:: kwargs - see django.contrib.auth.views.logout_then_login extra parameters. + :param kwargs: + see django.contrib.auth.views.logout_then_login extra parameters. """ msg = 'Logging out user "%(username)s".' % \