MCPcopy Create free account
hub / github.com/authlib/authlib / query_token

Function query_token

authlib/integrations/sqla_oauth2/functions.py:48–58  ·  view source on GitHub ↗
(token, token_type_hint)

Source from the content-addressed store, hash-verified

46 """
47
48 def query_token(token, token_type_hint):
49 q = session.query(token_model)
50 if token_type_hint == "access_token":
51 return q.filter_by(access_token=token).first()
52 elif token_type_hint == "refresh_token":
53 return q.filter_by(refresh_token=token).first()
54 # without token_type_hint
55 item = q.filter_by(access_token=token).first()
56 if item:
57 return item
58 return q.filter_by(refresh_token=token).first()
59
60 return query_token
61

Callers 1

query_tokenMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected