Skip to content

Commit

Permalink
Some docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Krismix1 committed Nov 16, 2024
1 parent ae5d746 commit f0df38d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/keycloak/keycloak_openid.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,14 @@ def introspect(self, token, rpt=None, token_type_hint=None):

@staticmethod
def _verify_token(token, key: Union[jwk.JWK, jwk.JWKSet, None], **kwargs):
"""Decode and optionally validate a token.
:param token: The token to verify
:param key: Which key should be used for validation.
If not provided, the validation is not performed and the token is implicitly valid.
:param kwargs: Additional keyword arguments for jwcrypto's JWT object
:returns: Decoded token
"""
# keep the function free of IO
# this way it can be used by `decode_token` and `a_decode_token`

Expand Down

0 comments on commit f0df38d

Please sign in to comment.