Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Fixing issues with /api/v1/me #984

wants to merge 1 commit into from

2 participants


Before refactor, pre(self) was called as such: OAuth2ResourceController.pre(self). Matching syntax from before.

Current clients get returned 401s when trying to access /api/v1/me and passing up access token w/ bearer authorization.

@pyro2927 pyro2927 Fixing issues with /api/v1/me
Before refactor, `pre(self)` was called as such: `OAuth2ResourceController.pre(self)`.  Matching syntax from before.

While it's definitely possible I broke something during the refactoring, the proposed change won't have any effect. The function was called as OAuth2ResourceController.pre(self) previously due to how things were subclassed. Sub- and super-classes of OAuth2ResourceController also had pre methods, so it was previously necessary to explicitly call the pre method of the desired class.

After the refactor, there's only one authenticate_with_token method, so the subclassing is not a concern and the function can be called normally.

@kemitche kemitche closed this

Gotchya. My understanding of python syntax is off then, guess I better freshen up!

Also, is your reddit avatar a dragon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 3, 2014
  1. @pyro2927

    Fixing issues with /api/v1/me

    pyro2927 authored
    Before refactor, `pre(self)` was called as such: `OAuth2ResourceController.pre(self)`.  Matching syntax from before.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  r2/r2/controllers/
2  r2/r2/controllers/
@@ -1088,7 +1088,7 @@ def authenticate_with_token(self):
def check_for_bearer_token(self):
if self._get_bearer_token(strict=False):
- self.authenticate_with_token()
+ OAuth2ResourceController.authenticate_with_token(self)
if c.oauth_user:
c.user = c.oauth_user
c.user_is_loggedin = True
Something went wrong with that request. Please try again.