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

## IUserCodeNormalizer Interface

Canonicalizes a user\-entered user code before it is matched against a stored code in the
Device Authorization Grant \(RFC 8628\)\. RFC 8628 Section 6\.1 recommends that the server strip
readability punctuation the user may have copied \(dashes, spaces\), case\-fold input for
single\-case character sets, and drop any characters outside the configured alphabet, so that
equivalent user input is not rejected as invalid\.

```csharp
public interface IUserCodeNormalizer
```

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

## IUserCodeNormalizer\.Normalize\(string\) Method {#Abblix.Oidc.Server.Features.DeviceAuthorization.Interfaces.IUserCodeNormalizer.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
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.Interfaces.IUserCodeNormalizer.Normalize(string).userCode}

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

#### 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\.
