MCPcopy
hub / github.com/authlib/authlib / _prepare_token_endpoint_body

Method _prepare_token_endpoint_body

authlib/oauth2/client.py:494–502  ·  view source on GitHub ↗
(self, body, grant_type, **kwargs)

Source from the content-addressed store, hash-verified

492 return self._http_post(url, body, auth=auth, headers=headers, **session_kwargs)
493
494 def _prepare_token_endpoint_body(self, body, grant_type, **kwargs):
495 if grant_type == "authorization_code":
496 if "redirect_uri" not in kwargs:
497 kwargs["redirect_uri"] = self.redirect_uri
498 return prepare_token_request(grant_type, body, **kwargs)
499
500 if "scope" not in kwargs and self.scope:
501 kwargs["scope"] = self.scope
502 return prepare_token_request(grant_type, body, **kwargs)
503
504 def _extract_session_request_params(self, kwargs):
505 """Extract parameters for session object from the passing ``**kwargs``."""

Callers 1

fetch_tokenMethod · 0.95

Calls 1

prepare_token_requestFunction · 0.85

Tested by

no test coverage detected