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

Function server

tests/flask/test_oauth2/test_device_code_grant.py:88–98  ·  view source on GitHub ↗
(server, app)

Source from the content-addressed store, hash-verified

86
87@pytest.fixture(autouse=True)
88def server(server, app):
89 server.register_grant(DeviceCodeGrant)
90
91 @app.route("/device_authorize", methods=["POST"])
92 def device_authorize():
93 name = DeviceAuthorizationEndpoint.ENDPOINT_NAME
94 return server.create_endpoint_response(name)
95
96 server.register_endpoint(DeviceAuthorizationEndpoint)
97
98 return server
99
100
101@pytest.fixture(autouse=True)

Callers

nothing calls this directly

Calls 2

register_grantMethod · 0.80
register_endpointMethod · 0.80

Tested by

no test coverage detected