first draft
This commit is contained in:
parent
a6ad6604aa
commit
2140cbf33c
3 changed files with 4 additions and 5 deletions
|
@ -27,6 +27,7 @@ type Configuration interface {
|
|||
GrantTypeRefreshTokenSupported() bool
|
||||
GrantTypeTokenExchangeSupported() bool
|
||||
GrantTypeJWTAuthorizationSupported() bool
|
||||
GrantTypeClientCredentialsSupported() bool
|
||||
IntrospectionAuthMethodPrivateKeyJWTSupported() bool
|
||||
IntrospectionEndpointSigningAlgorithmsSupported() []string
|
||||
RevocationAuthMethodPrivateKeyJWTSupported() bool
|
||||
|
|
|
@ -75,6 +75,9 @@ func GrantTypes(c Configuration) []oidc.GrantType {
|
|||
if c.GrantTypeRefreshTokenSupported() {
|
||||
grantTypes = append(grantTypes, oidc.GrantTypeRefreshToken)
|
||||
}
|
||||
if c.GrantTypeClientCredentialsSupported() {
|
||||
grantTypes = append(grantTypes, oidc.GrantTypeClientCredentials)
|
||||
}
|
||||
if c.GrantTypeTokenExchangeSupported() {
|
||||
grantTypes = append(grantTypes, oidc.GrantTypeTokenExchange)
|
||||
}
|
||||
|
|
|
@ -98,11 +98,6 @@ func AuthorizeClientCredentialsClient(ctx context.Context, request *oidc.ClientC
|
|||
return nil, oidc.ErrUnauthorizedClient()
|
||||
}
|
||||
|
||||
am := client.AuthMethod()
|
||||
if am != oidc.AuthMethodBasic || am != oidc.AuthMethodPost {
|
||||
return nil, oidc.ErrInvalidClient().WithDescription("auth_method %s not supported for client_credentials grant.", am)
|
||||
}
|
||||
|
||||
return client, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue