return_url_with_header#
- async gafaelfawr.dependencies.return_url.return_url_with_header(rd=Query(None), x_auth_request_redirect=Header(None), context=Depends(ContextDependency))#
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:
x_auth_request_redirect (
Optional
[str
], default:Header(None)
) –context (
RequestContext
, default:Depends(ContextDependency)
) –