Skip to content

Commit

Permalink
TT-13185, fixed max allowed authorize types to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-tyk committed Oct 24, 2024
1 parent ff94667 commit 816137d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gateway/mw_oauth2_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func getOAuthHeaderProvider(oauthConfig apidef.UpstreamOAuth) (OAuthHeaderProvid
}

switch {
case len(oauthConfig.AllowedAuthorizeTypes) > 2:
case len(oauthConfig.AllowedAuthorizeTypes) > 1:
return nil, fmt.Errorf("both client credentials and password authentication are provided")
case oauthConfig.AllowedAuthorizeTypes[0] == ClientCredentialsAuthorizeType:
return &ClientCredentialsOAuthProvider{}, nil
Expand Down

0 comments on commit 816137d

Please sign in to comment.