Skip to main content

ExactMatchUriValidator Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.UriValidation

ExactMatchUriValidator Class

Implements the simple-string-comparison matching rule for redirect URIs (RFC 6749 §3.1.2.2): the candidate URI must equal a single registered absolute URI. Optionally strips the query and fragment from the candidate before comparison to accommodate clients that append dynamic query parameters at runtime.

public sealed class ExactMatchUriValidator : Abblix.Oidc.Server.Features.UriValidation.IUriValidator

Inheritance System.Object → ExactMatchUriValidator

Implements IUriValidator

Constructors

ExactMatchUriValidator(Uri, bool) Constructor

Creates a validator that accepts exactly validUri.

public ExactMatchUriValidator(System.Uri validUri, bool ignoreQueryAndFragment=false);

Parameters

validUri System.Uri

The single registered absolute URI to match against.

ignoreQueryAndFragment System.Boolean

When true, the candidate URI's query and fragment are stripped before comparison; otherwise comparison is exact, including those components.

Exceptions

System.ArgumentException
validUri is not an absolute URI.

Methods

ExactMatchUriValidator.IsValid(Uri) Method

Validates the specified URI by checking for an exact match with the predefined URI.

public bool IsValid(System.Uri uri);

Parameters

uri System.Uri

The URI to validate.

Implements IsValid(Uri)

Returns

System.Boolean
true if the specified URI exactly matches the predefined URI, otherwise false.