Skip to content

Conversation

@mez
Copy link

@mez mez commented Jun 19, 2014

This will give people an option to 'logout'. so making a handler to process the delete() can call this method to remove the token.

This will give people an option to 'logout'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you envision this method being called when a User instance is available? My guess is that a logout endpoint would unfold like so:

  • Verify the provided access token and retrieve the current user
  • Delete the access token

If that flow is correct, would it be more appropriate to bind this method to the instance? e.g.

def delete_bearer_token(self, token):
   self.token_model.get_key(self.get_id(), 'bearer', token).delete()

Feel free to disagree. And thanks again for the PR!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point!

@loudnate
Copy link
Owner

loudnate commented Aug 2, 2014

Hey @mez, are you interested in making the suggested change? I'm happy to do it as well, since it sounds like we're in agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants