UserCodeValidator Class
Abblix.Oidc.Server
Abblix.Oidc.Server.Endpoints.BackChannelAuthentication.Validation
UserCodeValidator Class
Validates the presence of a UserCode in backchannel authentication requests, based on the client and provider configuration. This validator ensures that if the client or provider requires the UserCode parameter for backchannel authentication, it is included in the request.
public class UserCodeValidator : Abblix.Oidc.Server.Endpoints.BackChannelAuthentication.Validation.IBackChannelAuthenticationContextValidator
Inheritance System.Object → UserCodeValidator
Implements IBackChannelAuthenticationContextValidator
Remarks
This validator checks <em>presence</em> only. Verifying the code's <em>value</em> against the user's actual code is the host's responsibility and happens during the device interaction — see the security contract on IUserDeviceAuthenticationHandler.
Constructors
UserCodeValidator(IOptions<OidcOptions>) Constructor
Validates the presence of a UserCode in backchannel authentication requests, based on the client and provider configuration. This validator ensures that if the client or provider requires the UserCode parameter for backchannel authentication, it is included in the request.
public UserCodeValidator(Microsoft.Extensions.Options.IOptions<Abblix.Oidc.Server.Common.Configuration.OidcOptions> options);
Parameters
options Microsoft.Extensions.Options.IOptions<OidcOptions>
The OIDC options used to configure the behavior of the backchannel authentication process.
Remarks
This validator checks <em>presence</em> only. Verifying the code's <em>value</em> against the user's actual code is the host's responsibility and happens during the device interaction — see the security contract on IUserDeviceAuthenticationHandler.
Methods
UserCodeValidator.ValidateAsync(BackChannelAuthenticationValidationContext) Method
Asynchronously validates the UserCode parameter in the context of a backchannel authentication request. If the UserCode is required but not present, the method returns an error. Otherwise, it returns null.
public System.Threading.Tasks.Task<Abblix.Oidc.Server.Common.OidcError?> ValidateAsync(Abblix.Oidc.Server.Endpoints.BackChannelAuthentication.Validation.BackChannelAuthenticationValidationContext context);
Parameters
context BackChannelAuthenticationValidationContext
The validation context containing the authentication request and client information.
Implements ValidateAsync(BackChannelAuthenticationValidationContext)
Returns
System.Threading.Tasks.Task<OidcError>
A task that returns an error if validation fails,
or null if successful.