IRedirectUriTrustPolicy Interface
Decides whether the authorization endpoint may send the user agent to a client's registered redirect URIs on its own, with an error the end user did not choose.
public interface IRedirectUriTrustPolicyDerived
↳ RedirectUriTrustPolicy
Remarks
RFC 9700 section 4.11.2: whoever registers a client registers its redirect URI too, and an erroneous request, a
declined consent or a silent request (prompt=none) would then have the server redirect the user agent there.
"Based on its risk assessment, the authorization server needs to decide whether or not it can trust the redirection
URI", and it "SHOULD only automatically redirect the user agent if it trusts the redirection URI". An authorization
error for a client this policy does not trust is answered by the server itself, with status 400 and the error in
the body, rather than at the client's redirect URI; a successful authorization still reaches the client, since it
follows the end user's own consent to that client.
The default, RedirectUriTrustPolicy, trusts every client but an untrusted one. A host registering its own implementation decides by its own assessment, the source of the client or what is known of its URIs.
Methods
IRedirectUriTrustPolicy.IsTrustedAsync(TenantDefinition, ClientInfo) Method
Whether the server may redirect the user agent to the redirect URIs of client with an authorization error.
System.Threading.Tasks.Task<bool> IsTrustedAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo client);Parameters
tenant TenantDefinition
The tenant the authorization request is served at.
client ClientInfo
The client the request names, found at that tenant.
Returns
System.Threading.Tasks.Task<System.Boolean>
true when the client's redirect URIs are trusted.