IUserCodeNormalizer Interface
Abblix.Oidc.Server
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.
public interface IUserCodeNormalizer
Derived
↳ UserCodeNormalizer
Methods
IUserCodeNormalizer.Normalize(string) Method
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.
string Normalize(string userCode);
Parameters
userCode System.String
The raw user code as entered by the end-user.
Returns
System.String
The canonical user code used for storage lookup and rate limiting.