Skip to content

Commit

Permalink
doc: improve RFC9068 examples in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
twalcari authored and azmeuk committed Nov 5, 2024
1 parent 64c3eed commit 1cba980
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion authlib/oauth2/rfc9068/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ class JWTIntrospectionEndpoint(IntrospectionEndpoint):
::
class MyJWTAccessTokenIntrospectionEndpoint(JWTRevocationEndpoint):
class MyJWTAccessTokenIntrospectionEndpoint(JWTIntrospectionEndpoint):
def get_jwks(self):
...
def get_username(self, user_id):
...
# endpoint dedicated to JWT access token introspection
authorization_server.register_endpoint(
MyJWTAccessTokenIntrospectionEndpoint(
issuer="https://authorization-server.example.org",
)
)
# another endpoint dedicated to refresh token introspection
authorization_server.register_endpoint(MyRefreshTokenIntrospectionEndpoint)
'''
Expand Down
3 changes: 3 additions & 0 deletions authlib/oauth2/rfc9068/revocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ class MyJWTAccessTokenRevocationEndpoint(JWTRevocationEndpoint):
def get_jwks(self):
...
# endpoint dedicated to JWT access token revokation
authorization_server.register_endpoint(
MyJWTAccessTokenRevocationEndpoint(
issuer="https://authorization-server.example.org",
)
)
# another endpoint dedicated to refresh token revokation
authorization_server.register_endpoint(MyRefreshTokenRevocationEndpoint)
.. _RFC7009: https://tools.ietf.org/html/rfc7009
Expand Down

0 comments on commit 1cba980

Please sign in to comment.