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

## SecureUriValidator Class

Default [ISecureUriValidator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.SecureHttpFetch.ISecureUriValidator 'Abblix\.Oidc\.Server\.Features\.SecureHttpFetch\.ISecureUriValidator') implementation: applies the scheme allow\-list and the
internal\-hostname / private\-or\-reserved IP\-literal rules from [SecureHttpFetchOptions](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.SecureHttpFetch.SecureHttpFetchOptions 'Abblix\.Oidc\.Server\.Features\.SecureHttpFetch\.SecureHttpFetchOptions')\.

```csharp
public class SecureUriValidator : Abblix.Oidc.Server.Features.SecureHttpFetch.ISecureUriValidator
```

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

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

## SecureUriValidator\(IOptions\<SecureHttpFetchOptions\>\) Constructor {#Abblix.Oidc.Server.Features.SecureHttpFetch.SecureUriValidator.SecureUriValidator(Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Features.SecureHttpFetch.SecureHttpFetchOptions_)}

Default [ISecureUriValidator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.SecureHttpFetch.ISecureUriValidator 'Abblix\.Oidc\.Server\.Features\.SecureHttpFetch\.ISecureUriValidator') implementation: applies the scheme allow\-list and the
internal\-hostname / private\-or\-reserved IP\-literal rules from [SecureHttpFetchOptions](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.SecureHttpFetch.SecureHttpFetchOptions 'Abblix\.Oidc\.Server\.Features\.SecureHttpFetch\.SecureHttpFetchOptions')\.

```csharp
public SecureUriValidator(Microsoft.Extensions.Options.IOptions<Abblix.Oidc.Server.Features.SecureHttpFetch.SecureHttpFetchOptions> options);
```
#### Parameters

###### `options` [Microsoft\.Extensions\.Options\.IOptions&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptions-1 'Microsoft\.Extensions\.Options\.IOptions\`1')[SecureHttpFetchOptions](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.SecureHttpFetch.SecureHttpFetchOptions 'Abblix\.Oidc\.Server\.Features\.SecureHttpFetch\.SecureHttpFetchOptions')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptions-1 'Microsoft\.Extensions\.Options\.IOptions\`1') {#Abblix.Oidc.Server.Features.SecureHttpFetch.SecureUriValidator.SecureUriValidator(Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Features.SecureHttpFetch.SecureHttpFetchOptions_).options}
### Methods

## SecureUriValidator\.IsInternalHostname\(string\) Method {#Abblix.Oidc.Server.Features.SecureHttpFetch.SecureUriValidator.IsInternalHostname(string)}

Checks if a hostname appears to be internal or non\-public\.

```csharp
public static bool IsInternalHostname(string hostname);
```
#### Parameters

###### `hostname` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.SecureHttpFetch.SecureUriValidator.IsInternalHostname(string).hostname}

#### Returns
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')

## SecureUriValidator\.IsPrivateOrReservedAddress\(IPAddress\) Method {#Abblix.Oidc.Server.Features.SecureHttpFetch.SecureUriValidator.IsPrivateOrReservedAddress(System.Net.IPAddress)}

Checks if an IP address is private, loopback, link\-local, or otherwise reserved\.

```csharp
public static bool IsPrivateOrReservedAddress(System.Net.IPAddress address);
```
#### Parameters

###### `address` [System\.Net\.IPAddress](https://learn.microsoft.com/en-us/dotnet/api/system.net.ipaddress 'System\.Net\.IPAddress') {#Abblix.Oidc.Server.Features.SecureHttpFetch.SecureUriValidator.IsPrivateOrReservedAddress(System.Net.IPAddress).address}

#### Returns
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')

## SecureUriValidator\.Validate\(Uri\) Method {#Abblix.Oidc.Server.Features.SecureHttpFetch.SecureUriValidator.Validate(System.Uri)}

Validates a URI against the configured SSRF policy without resolving DNS\.

```csharp
public string? Validate(System.Uri uri);
```
#### Parameters

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

The URI to validate\.

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

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
`null` when the URI is allowed; otherwise a human\-readable reason for the rejection\.
