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

## DeviceAuthorizationOptionsValidator Class

Fails loudly the first time [OidcOptions](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions') is resolved when the device authorization endpoint is enabled
but its settings are absent, instead of letting the contradiction surface as an unhandled HTTP 500 on the first
request\. The endpoint is off in the default [Base](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcEndpoints#Abblix.Oidc.Server.Common.Configuration.OidcEndpoints.Base 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcEndpoints\.Base') set and is turned on only by an
explicit `AddDeviceAuthorization()` opt\-in \(or a host that sets the
[DeviceAuthorization](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcEndpoints#Abblix.Oidc.Server.Common.Configuration.OidcEndpoints.DeviceAuthorization 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcEndpoints\.DeviceAuthorization') flag itself\), yet [DeviceAuthorization](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions#Abblix.Oidc.Server.Common.Configuration.OidcOptions.DeviceAuthorization 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\.DeviceAuthorization') has
no default — so a host that enables it without configuring it has an internally inconsistent configuration this
validator turns into a clear startup error\. A no\-op when the endpoint is disabled or the settings are present\.

```csharp
public class DeviceAuthorizationOptionsValidator : Microsoft.Extensions.Options.IValidateOptions<Abblix.Oidc.Server.Common.Configuration.OidcOptions>
```

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

Implements [Microsoft\.Extensions\.Options\.IValidateOptions&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ivalidateoptions-1 'Microsoft\.Extensions\.Options\.IValidateOptions\`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.ivalidateoptions-1 'Microsoft\.Extensions\.Options\.IValidateOptions\`1')
