Redirects the user to obtain OAuth authorization for this service. Some providers require that you register a redirect URL with your application instead of passing one via this method. You should call this method to log the user in, and then call ``get_authenticated_
(
self,
redirect_uri: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
extra_params: Optional[Dict[str, Any]] = None,
scope: Optional[List[str]] = None,
response_type: str = "code",
)
| 551 | """ |
| 552 | |
| 553 | def authorize_redirect( |
| 554 | self, |
| 555 | redirect_uri: Optional[str] = None, |
| 556 | client_id: Optional[str] = None, |
| 557 | client_secret: Optional[str] = None, |
| 558 | extra_params: Optional[Dict[str, Any]] = None, |
| 559 | scope: Optional[List[str]] = None, |
| 560 | response_type: str = "code", |
| 561 | ) -> None: |
| 562 | """Redirects the user to obtain OAuth authorization for this service. |
| 563 | |
| 564 | Some providers require that you register a redirect URL with |
| 565 | your application instead of passing one via this method. You |
| 566 | should call this method to log the user in, and then call |
| 567 | ``get_authenticated_user`` in the handler for your |
| 568 | redirect URL to complete the authorization process. |
| 569 | |
| 570 | .. versionchanged:: 6.0 |
| 571 | |
| 572 | The ``callback`` argument and returned awaitable were removed; |
| 573 | this is now an ordinary synchronous function. |
| 574 | """ |
| 575 | handler = cast(RequestHandler, self) |
| 576 | args = {"response_type": response_type} |
| 577 | if redirect_uri is not None: |
| 578 | args["redirect_uri"] = redirect_uri |
| 579 | if client_id is not None: |
| 580 | args["client_id"] = client_id |
| 581 | if extra_params: |
| 582 | args.update(extra_params) |
| 583 | if scope: |
| 584 | args["scope"] = " ".join(scope) |
| 585 | url = self._OAUTH_AUTHORIZE_URL # type: ignore |
| 586 | handler.redirect(url_concat(url, args)) |
| 587 | |
| 588 | def _oauth_request_token_url( |
| 589 | self, |
nothing calls this directly
no test coverage detected