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)
| 2 | |
| 3 | |
| 4 | def 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 | |
| 19 | def create_save_token_func(session, token_model): |
no outgoing calls
no test coverage detected