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

Function create_query_client_func

authlib/integrations/sqla_oauth2/functions.py:4–16  ·  view source on GitHub ↗

Create an ``query_client`` function that can be used in authorization server. :param session: SQLAlchemy session :param client_model: Client model class

(session, client_model)

Source from the content-addressed store, hash-verified

2
3
4def create_query_client_func(session, client_model):
5 """Create an ``query_client`` function that can be used in authorization
6 server.
7
8 :param session: SQLAlchemy session
9 :param client_model: Client model class
10 """
11
12 def query_client(client_id):
13 q = session.query(client_model)
14 return q.filter_by(client_id=client_id).first()
15
16 return query_client
17
18
19def create_save_token_func(session, token_model):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected