return_url_with_header

async gafaelfawr.dependencies.return_url.return_url_with_header(*, rd=None, x_auth_request_redirect=None, context)

Validate a return URL in an rd parameter or header.

Same as return_url except also accepts a return URL in the X-Auth-Request-Redirect header if the rd query parameter was not set.

Returns:

The verified return URL, or None if none was given.

Return type:

urllib.parse.ParseResult

Raises:

fastapi.HTTPException – An appropriate error if the return URL was invalid.

Parameters: