Skip to content

Commit e521990

Browse files
committed
oauth2: replace a magic number with AuthStyleUnknown
Make it more clear that the auth style will be automatically detected when it is not configured.
1 parent 839de22 commit e521990

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/token.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func cloneURLValues(v url.Values) url.Values {
190190
}
191191

192192
func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle) (*Token, error) {
193-
needsAuthStyleProbe := authStyle == 0
193+
needsAuthStyleProbe := authStyle == AuthStyleUnknown
194194
if needsAuthStyleProbe {
195195
if style, ok := lookupAuthStyle(tokenURL); ok {
196196
authStyle = style

0 commit comments

Comments
 (0)