UriValidatorFactory Class
Abblix.Oidc.Server
Abblix.Oidc.Server.Features.UriValidation
UriValidatorFactory Class
Provides a factory method for creating URI validators. Depending on the number of URIs provided, it creates either a single exact match validator or a composite validator that combines multiple exact match validators.
public static class UriValidatorFactory
Inheritance System.Object → UriValidatorFactory
Methods
UriValidatorFactory.Create(bool, Uri[]) Method
Creates a URI validator based on the given URIs, with an option to ignore query strings and fragments during validation.
public static Abblix.Oidc.Server.Features.UriValidation.IUriValidator Create(bool ignoreQueryAndFragment, params System.Uri[] validUris);
Parameters
ignoreQueryAndFragment System.Boolean
Specifies whether query strings and fragments should be ignored during validation.
validUris System.Uri[]
An array of URIs to be used for validation.
Returns
IUriValidator
An IUriValidator instance that can validate URIs based on the provided URIs.
Returns an ExactMatchUriValidator for a single URI or a CompositeUriValidator
for multiple URIs.
Remarks
- If only one URI is provided, an ExactMatchUriValidator is returned. - If multiple URIs are provided, a CompositeUriValidator is returned, which validates against all specified URIs. - The `ignoreQueryAndFragment` parameter determines whether query strings and fragments in URIs are considered during validation.
UriValidatorFactory.Create(Uri[]) Method
Creates a URI validator based on the given URIs. If only one URI is provided, it returns an ExactMatchUriValidator for that URI. If multiple URIs are provided, it returns a CompositeUriValidator that validates against all given URIs.
public static Abblix.Oidc.Server.Features.UriValidation.IUriValidator Create(params System.Uri[] validUris);
Parameters
validUris System.Uri[]
An array of URIs to be used for validation.
Returns
IUriValidator
An IUriValidator instance that can validate URIs based on the provided URIs.
Returns an ExactMatchUriValidator for a single URI or a CompositeUriValidator
for multiple URIs.
Remarks
Use this method when you want to create a validator with default behavior for handling query strings and fragments during validation.