MCPcopy Create free account
hub / github.com/oauthlib/oauthlib / default_flow_token_response

Method default_flow_token_response

examples/device_code_flow.py:217–222  ·  view source on GitHub ↗
(self, request)

Source from the content-addressed store, hash-verified

215# You should already have the /token endpoint implemented in your provider.
216class TokenEndpoint(ServerSetupForTokenEndpoint):
217 def default_flow_token_response(self, request):
218 url, headers, body, status = self.server.create_token_response(request)
219 access_token = json.loads(body).get("access_token")
220
221 # return access_token in a http response
222 return access_token
223
224 @rate_limit # this will raise the SlowDownError
225 def device_flow_token_response(self, request, device_code):

Callers 1

postMethod · 0.95

Calls 2

getMethod · 0.80
create_token_responseMethod · 0.45

Tested by

no test coverage detected