#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Features\.UriValidation](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UriValidation '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\.

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

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → ExactMatchUriValidator

Implements [IUriValidator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UriValidation.IUriValidator 'Abblix\.Oidc\.Server\.Features\.UriValidation\.IUriValidator')
### Constructors

## ExactMatchUriValidator\(Uri, bool\) Constructor {#Abblix.Oidc.Server.Features.UriValidation.ExactMatchUriValidator.ExactMatchUriValidator(System.Uri,bool)}

Creates a validator that accepts exactly [validUri](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UriValidation.ExactMatchUriValidator#Abblix.Oidc.Server.Features.UriValidation.ExactMatchUriValidator.ExactMatchUriValidator(System.Uri,bool).validUri 'Abblix\.Oidc\.Server\.Features\.UriValidation\.ExactMatchUriValidator\.ExactMatchUriValidator\(System\.Uri, bool\)\.validUri')\.

```csharp
public ExactMatchUriValidator(System.Uri validUri, bool ignoreQueryAndFragment=false);
```
#### Parameters

###### `validUri` [System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri') {#Abblix.Oidc.Server.Features.UriValidation.ExactMatchUriValidator.ExactMatchUriValidator(System.Uri,bool).validUri}

The single registered absolute URI to match against\.

###### `ignoreQueryAndFragment` [System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean') {#Abblix.Oidc.Server.Features.UriValidation.ExactMatchUriValidator.ExactMatchUriValidator(System.Uri,bool).ignoreQueryAndFragment}

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

#### Exceptions

[System\.ArgumentException](https://learn.microsoft.com/en-us/dotnet/api/system.argumentexception 'System\.ArgumentException')  
[validUri](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UriValidation.ExactMatchUriValidator#Abblix.Oidc.Server.Features.UriValidation.ExactMatchUriValidator.ExactMatchUriValidator(System.Uri,bool).validUri 'Abblix\.Oidc\.Server\.Features\.UriValidation\.ExactMatchUriValidator\.ExactMatchUriValidator\(System\.Uri, bool\)\.validUri') is not an absolute URI\.
### Methods

## ExactMatchUriValidator\.IsValid\(Uri\) Method {#Abblix.Oidc.Server.Features.UriValidation.ExactMatchUriValidator.IsValid(System.Uri)}

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

```csharp
public bool IsValid(System.Uri uri);
```
#### Parameters

###### `uri` [System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri') {#Abblix.Oidc.Server.Features.UriValidation.ExactMatchUriValidator.IsValid(System.Uri).uri}

The URI to validate\.

Implements [IsValid\(Uri\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UriValidation.IUriValidator#Abblix.Oidc.Server.Features.UriValidation.IUriValidator.IsValid(System.Uri) 'Abblix\.Oidc\.Server\.Features\.UriValidation\.IUriValidator\.IsValid\(System\.Uri\)')

#### Returns
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')  
`true` if the specified URI exactly matches the predefined URI, otherwise `false`\.
