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

## UserCodeNormalizer Class

Canonicalizes user\-entered user codes for the Device Authorization Grant \(RFC 8628\) following
the input\-processing guidance in Section 6\.1: punctuation added for readability \(dashes,
spaces\) and any other characters outside the configured alphabet are dropped, and case is
folded when the alphabet is single\-case so that a user typing the equivalent lowercase \(or
uppercase\) form is not rejected\.

```csharp
public class UserCodeNormalizer : Abblix.Oidc.Server.Features.DeviceAuthorization.Interfaces.IUserCodeNormalizer
```

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

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

## UserCodeNormalizer\(IOptions\<OidcOptions\>\) Constructor {#Abblix.Oidc.Server.Features.DeviceAuthorization.UserCodeNormalizer.UserCodeNormalizer(Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_)}

Canonicalizes user\-entered user codes for the Device Authorization Grant \(RFC 8628\) following
the input\-processing guidance in Section 6\.1: punctuation added for readability \(dashes,
spaces\) and any other characters outside the configured alphabet are dropped, and case is
folded when the alphabet is single\-case so that a user typing the equivalent lowercase \(or
uppercase\) form is not rejected\.

```csharp
public UserCodeNormalizer(Microsoft.Extensions.Options.IOptions<Abblix.Oidc.Server.Common.Configuration.OidcOptions> 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')[OidcOptions](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptions-1 'Microsoft\.Extensions\.Options\.IOptions\`1') {#Abblix.Oidc.Server.Features.DeviceAuthorization.UserCodeNormalizer.UserCodeNormalizer(Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).options}

Configuration options carrying the user code alphabet\.
### Methods

## UserCodeNormalizer\.Normalize\(string\) Method {#Abblix.Oidc.Server.Features.DeviceAuthorization.UserCodeNormalizer.Normalize(string)}

Produces the canonical form of a user code for comparison: characters outside the
configured alphabet are removed, and case is folded when the alphabet is single\-case\.

```csharp
public string Normalize(string userCode);
```
#### Parameters

###### `userCode` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.DeviceAuthorization.UserCodeNormalizer.Normalize(string).userCode}

The raw user code as entered by the end\-user\.

Implements [Normalize\(string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.DeviceAuthorization.Interfaces.IUserCodeNormalizer#Abblix.Oidc.Server.Features.DeviceAuthorization.Interfaces.IUserCodeNormalizer.Normalize(string) 'Abblix\.Oidc\.Server\.Features\.DeviceAuthorization\.Interfaces\.IUserCodeNormalizer\.Normalize\(string\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
The canonical user code used for storage lookup and rate limiting\.
