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 theX-Auth-Request-Redirect
header if therd
query parameter was not set.- Returns:
The verified return URL, or
None
if none was given.- Return type:
- Raises:
fastapi.HTTPException – An appropriate error if the return URL was invalid.
- Parameters:
context (
RequestContext
)