diff options
author | Daniel Wagner-Hall <dawagner@gmail.com> | 2016-01-05 18:01:29 +0000 |
---|---|---|
committer | Daniel Wagner-Hall <dawagner@gmail.com> | 2016-01-05 18:01:29 +0000 |
commit | 29e131df432e264bc955fd4030f950df01c56201 (patch) | |
tree | 4629f12bbc21258834188131e8ad9f4733ea28ca /synapse/api/auth.py | |
parent | Merge pull request #464 from matrix-org/erikj/crop_correct (diff) | |
parent | Allow guests to upgrade their accounts (diff) | |
download | synapse-29e131df432e264bc955fd4030f950df01c56201.tar.xz |
Merge pull request #462 from matrix-org/daniel/guestupgrade
Allow guests to upgrade their accounts
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index adb7d64482..b86c6c8399 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2014, 2015 OpenMarket Ltd +# Copyright 2014 - 2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -583,7 +583,7 @@ class Auth(object): AuthError if no user by that token exists or the token is invalid. """ try: - ret = yield self._get_user_from_macaroon(token) + ret = yield self.get_user_from_macaroon(token) except AuthError: # TODO(daniel): Remove this fallback when all existing access tokens # have been re-issued as macaroons. @@ -591,7 +591,7 @@ class Auth(object): defer.returnValue(ret) @defer.inlineCallbacks - def _get_user_from_macaroon(self, macaroon_str): + def get_user_from_macaroon(self, macaroon_str): try: macaroon = pymacaroons.Macaroon.deserialize(macaroon_str) self.validate_macaroon(macaroon, "access", False) |