Skip to content

OidcEndpointResolver Class

Answers IOidcEndpointResolver from the endpoints MapOidcEndpoints(this IEndpointRouteBuilder, string) actually mapped, found by the stable name each one carries.

C#
public class OidcEndpointResolver : Abblix.Oidc.Server.Common.Interfaces.IOidcEndpointResolver

Inheritance System.Object → OidcEndpointResolver

Implements IOidcEndpointResolver

Remarks

Going through Microsoft.AspNetCore.Routing.LinkGenerator rather than reading OidcRouteOptions is what makes the answer the truth rather than a reconstruction of it: the generator sees the route as mapped, so a group prefix, the request's scheme and host, and the application's path base are all already in it. A disabled endpoint was never mapped and therefore has no name to find, which is the same null this contract returns for it.

Constructors

OidcEndpointResolver(IHttpContextAccessor, LinkGenerator) Constructor

Answers IOidcEndpointResolver from the endpoints MapOidcEndpoints(this IEndpointRouteBuilder, string) actually mapped, found by the stable name each one carries.

C#
public OidcEndpointResolver(Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor, Microsoft.AspNetCore.Routing.LinkGenerator linkGenerator);

Parameters

httpContextAccessor Microsoft.AspNetCore.Http.IHttpContextAccessor
linkGenerator Microsoft.AspNetCore.Routing.LinkGenerator

Remarks

Going through Microsoft.AspNetCore.Routing.LinkGenerator rather than reading OidcRouteOptions is what makes the answer the truth rather than a reconstruction of it: the generator sees the route as mapped, so a group prefix, the request's scheme and host, and the application's path base are all already in it. A disabled endpoint was never mapped and therefore has no name to find, which is the same null this contract returns for it.

Methods

OidcEndpointResolver.Resolve(OidcEndpoints) Method

Returns the absolute URL of endpoint for the current request.

C#
public System.Uri? Resolve(Abblix.Oidc.Server.Common.Configuration.OidcEndpoints endpoint);

Parameters

endpoint OidcEndpoints

The endpoint to resolve. Exactly one flag, never a combination: All and Base name a set rather than an endpoint and resolve to nothing.

Implements Resolve(OidcEndpoints)

Returns

System.Uri
The endpoint's absolute URL, or null when it is not mapped - because the endpoint is disabled in EnabledEndpoints, or because its route takes parameters this contract cannot supply, which today is the per-client configuration endpoint of RegisterClient.