get_login

gafaelfawr.handlers.login.get_login(request: aiohttp.web_request.Request) → aiohttp.web_response.Response

Handle an initial login.

Constructs the authentication URL and redirects the user to the authentication provider.

Parameters:request (aiohttp.web.Request) – Incoming request.
Returns:response – The response.
Return type:aiohttp.web.Response
Raises:NotImplementedError – If no authentication provider is configured.

Notes

Also export the login handler at /oauth2/callback, the route used by oauth2_proxy, for compatibility with older oauth2_proxy installations. This avoids needing to change the redirect_uri registered with an OpenID Connect provider. It can be removed once all registrations have been updated with the /login route.