Created
May 23, 2016 06:12
-
-
Save toughrogrammer/ab08f4384862cbd0bdaf6e5eb2b5f245 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @oauth_provider.invalid_response | |
| def invalid_response(req): | |
| if req.error_message == 'Bearer token is expired.': | |
| raise ExpiredError | |
| elif req.error_message == 'Bearer token scope not valid.': | |
| raise NoPermissionError | |
| else: | |
| raise RequiredSignInError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment