Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed request_invalid and token_revoked methods #514

Merged
merged 2 commits into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions authlib/integrations/django_oauth2/resource_protector.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ def authenticate_token(self, token_string):
except self.token_model.DoesNotExist:
return None

def request_invalid(self, request):
return False


def return_error_response(error):
body = dict(error.get_body())
Expand Down
6 changes: 0 additions & 6 deletions authlib/integrations/flask_oauth2/resource_protector.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ class MyBearerTokenValidator(BearerTokenValidator):
def authenticate_token(self, token_string):
return Token.query.filter_by(access_token=token_string).first()

def request_invalid(self, request):
return False

def token_revoked(self, token):
return False

require_oauth.register_token_validator(MyBearerTokenValidator())

# protect resource with require_oauth
Expand Down
6 changes: 0 additions & 6 deletions authlib/integrations/sqla_oauth2/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,4 @@ def authenticate_token(self, token_string):
q = session.query(token_model)
return q.filter_by(access_token=token_string).first()

def request_invalid(self, request):
return False

def token_revoked(self, token):
return token.revoked

return _BearerTokenValidator
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Version x.x.x
-------------

- Removed ``has_client_secret`` method and documentation, via :gh:`PR#513`
- Removed ``request_invalid`` and ``token_revoked`` remaining occurences
and documentation. :gh:`PR514`

Version 1.2.0
-------------
Expand Down