fix device code support check

This commit is contained in:
Tim Möhlmann 2023-12-15 13:16:08 +02:00
parent 3a16504990
commit 315ec4cedf

View file

@ -291,7 +291,7 @@ func (s *LegacyServer) ClientCredentialsExchange(ctx context.Context, r *ClientR
} }
func (s *LegacyServer) DeviceToken(ctx context.Context, r *ClientRequest[oidc.DeviceAccessTokenRequest]) (*Response, error) { func (s *LegacyServer) DeviceToken(ctx context.Context, r *ClientRequest[oidc.DeviceAccessTokenRequest]) (*Response, error) {
if !s.provider.GrantTypeClientCredentialsSupported() { if !s.provider.GrantTypeDeviceCodeSupported() {
return nil, unimplementedGrantError(oidc.GrantTypeDeviceCode) return nil, unimplementedGrantError(oidc.GrantTypeDeviceCode)
} }
// use a limited context timeout shorter as the default // use a limited context timeout shorter as the default