freeznet commented on code in PR #1463:
URL: https://github.com/apache/pulsar-client-go/pull/1463#discussion_r2741631404


##########
oauth2/client_credentials_flow.go:
##########
@@ -70,7 +71,18 @@ func (p *DefaultGrantProvider) GetGrant(audience string, 
options *ClientCredenti
                return nil, errors.Wrap(err, "could not get client credentials")
        }
 
-       wellKnownEndpoints, err := 
GetOIDCWellKnownEndpointsFromIssuerURL(keyFile.IssuerURL)
+       issuerURL := ""
+       if options != nil {
+               issuerURL = options.IssuerURL
+       }
+       if issuerURL == "" {
+               issuerURL = keyFile.IssuerURL
+       }
+       if issuerURL == "" {
+               return nil, errors.New("issuer url is required for client 
credentials flow")
+       }
+
+       wellKnownEndpoints, err := 
GetOIDCWellKnownEndpointsFromIssuerURL(issuerURL)
        if err != nil {

Review Comment:
   addressed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to