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

## AlgorithmRefusedByProfileException Class

[ProfiledJwtIssuer](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Tokens.Formatters.ProfiledJwtIssuer 'Abblix\.Oidc\.Server\.Features\.Tokens\.Formatters\.ProfiledJwtIssuer') refused to issue a token because the security profile in force does not admit its
            signature or key management algorithm\.

```csharp
public sealed class AlgorithmRefusedByProfileException : System.InvalidOperationException
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → [System\.Exception](https://learn.microsoft.com/en-us/dotnet/api/system.exception 'System\.Exception') → [System\.SystemException](https://learn.microsoft.com/en-us/dotnet/api/system.systemexception 'System\.SystemException') → [System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException') → AlgorithmRefusedByProfileException

### Remarks
Carries what was refused, so a path that chose the algorithm from a key a party published can answer that party's
request instead of failing as the server\.
### Constructors

## AlgorithmRefusedByProfileException\(string, string, JsonWebKey\) Constructor {#Abblix.Oidc.Server.Features.Tokens.Formatters.AlgorithmRefusedByProfileException.AlgorithmRefusedByProfileException(string,string,Abblix.Jwt.JsonWebKey)}

Creates the refusal\.

```csharp
public AlgorithmRefusedByProfileException(string message, string? algorithm, Abblix.Jwt.JsonWebKey? encryptionKey);
```
#### Parameters

###### `message` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Tokens.Formatters.AlgorithmRefusedByProfileException.AlgorithmRefusedByProfileException(string,string,Abblix.Jwt.JsonWebKey).message}

What was refused, for the log\.

###### `algorithm` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Tokens.Formatters.AlgorithmRefusedByProfileException.AlgorithmRefusedByProfileException(string,string,Abblix.Jwt.JsonWebKey).algorithm}

The algorithm the profile does not admit\.

###### `encryptionKey` [JsonWebKey](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey') {#Abblix.Oidc.Server.Features.Tokens.Formatters.AlgorithmRefusedByProfileException.AlgorithmRefusedByProfileException(string,string,Abblix.Jwt.JsonWebKey).encryptionKey}

The key the token would have been encrypted to, where the refused algorithm is
            its key management algorithm; null where it is the signature algorithm\.
### Properties

## AlgorithmRefusedByProfileException\.Algorithm Property {#Abblix.Oidc.Server.Features.Tokens.Formatters.AlgorithmRefusedByProfileException.Algorithm}

The algorithm the profile does not admit, null where the token named none\.

```csharp
public string? Algorithm { get; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## AlgorithmRefusedByProfileException\.EncryptionKey Property {#Abblix.Oidc.Server.Features.Tokens.Formatters.AlgorithmRefusedByProfileException.EncryptionKey}

The key the token would have been encrypted to, where the refused algorithm is its key management algorithm\.

```csharp
public Abblix.Jwt.JsonWebKey? EncryptionKey { get; }
```

#### Property Value
[JsonWebKey](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey')
