MCPcopy Index your code
hub / github.com/diffgram/diffgram / get_decoded_refresh_token_from_session

Function get_decoded_refresh_token_from_session

shared/helpers/permissions.py:54–66  ·  view source on GitHub ↗

Gets the JWT from the client cookie. :return: String representing the refresh token

()

Source from the content-addressed store, hash-verified

52
53
54def get_decoded_refresh_token_from_session() -> str or None:
55 """
56 Gets the JWT from the client cookie.
57 :return: String representing the refresh token
58 """
59
60 jwt_token = login_session.get('refresh_token')
61 if type(jwt_token) == str:
62 return jwt_token
63 if jwt_token is None:
64 return None
65 token_string = gzip.decompress(jwt_token).decode()
66 return token_string
67
68
69def get_decoded_id_token_from_session() -> str or None:

Callers 2

oauth2_logoutFunction · 0.90
try_refreshing_tokensFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected