docs/versioned_docs/version-7.3.x/features/endpoints.md
OAuth2 Proxy responds directly to the following endpoints. All other endpoints will be proxied upstream when authenticated. The /oauth2 prefix can be changed with the --proxy-prefix config variable.
--metrics-address, disabled by defaultauth_request directiveTo sign the user out, redirect them to /oauth2/sign_out. This endpoint only removes oauth2-proxy's own cookies, i.e. the user is still logged in with the authentication provider and may automatically re-login when accessing the application again. You will also need to redirect the user to the authentication provider's sign out page afterwards using the rd query parameter, i.e. redirect the user to something like (notice the url-encoding!):
/oauth2/sign_out?rd=https%3A%2F%2Fmy-oidc-provider.example.com%2Fsign_out_page
Alternatively, include the redirect URL in the X-Auth-Request-Redirect header:
GET /oauth2/sign_out HTTP/1.1
X-Auth-Request-Redirect: https://my-oidc-provider/sign_out_page
...
(The "sign_out_page" should be the end_session_endpoint from the metadata if your OIDC provider supports Session Management and Discovery.)
BEWARE that the domain you want to redirect to (my-oidc-provider.example.com in the example) must be added to the --whitelist-domain configuration option otherwise the redirect will be ignored.
This endpoint returns 202 Accepted response or a 401 Unauthorized response.
It can be configured using the following query parameters:
allowed_groups: comma separated list of allowed groupsallowed_email_domains: comma separated list of allowed email domainsallowed_emails: comma separated list of allowed emails