UserCodeGenerator Class
Generates user codes for the Device Authorization Grant (RFC 8628). The alphabet used for code generation is configurable to support numeric, alphabetic, or alphanumeric codes.
public class UserCodeGenerator : Abblix.Oidc.Server.Features.DeviceAuthorization.Interfaces.IUserCodeGeneratorInheritance System.Object → UserCodeGenerator
Implements IUserCodeGenerator
Constructors
UserCodeGenerator(IOptions<OidcOptions>) Constructor
Generates user codes for the Device Authorization Grant (RFC 8628). The alphabet used for code generation is configurable to support numeric, alphabetic, or alphanumeric codes.
public UserCodeGenerator(Microsoft.Extensions.Options.IOptions<Abblix.Oidc.Server.Common.Configuration.OidcOptions> options);Parameters
options Microsoft.Extensions.Options.IOptions<OidcOptions>
Configuration options containing user code settings.
Methods
UserCodeGenerator.GenerateUserCode() Method
Generates a user-friendly numeric code that the end-user enters on the verification page.
public string GenerateUserCode();Implements GenerateUserCode()
Returns
System.String
A numeric verification code (e.g., "1234-5678").