This fixes an issue where, when using the device authorization flow, the grant type would be set twice. Some OPs don't accept this, and fail when polling. With this fix the grant type is only set once, which will make some OPs happy again. Fixes #352
This commit is contained in:
parent
c778e8329c
commit
312c2a07e2
2 changed files with 1 additions and 2 deletions
|
@ -12,7 +12,6 @@ import (
|
|||
func newDeviceClientCredentialsRequest(scopes []string, rp RelyingParty) (*oidc.ClientCredentialsRequest, error) {
|
||||
confg := rp.OAuthConfig()
|
||||
req := &oidc.ClientCredentialsRequest{
|
||||
GrantType: oidc.GrantTypeDeviceCode,
|
||||
Scope: scopes,
|
||||
ClientID: confg.ClientID,
|
||||
ClientSecret: confg.ClientSecret,
|
||||
|
|
|
@ -241,7 +241,7 @@ type TokenExchangeRequest struct {
|
|||
}
|
||||
|
||||
type ClientCredentialsRequest struct {
|
||||
GrantType GrantType `schema:"grant_type"`
|
||||
GrantType GrantType `schema:"grant_type,omitempty"`
|
||||
Scope SpaceDelimitedArray `schema:"scope"`
|
||||
ClientID string `schema:"client_id"`
|
||||
ClientSecret string `schema:"client_secret"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue