cckellogg commented on a change in pull request #635:
URL: https://github.com/apache/pulsar-client-go/pull/635#discussion_r723751698
##########
File path: oauth2/oidc_endpoint_provider.go
##########
@@ -36,10 +36,16 @@ type OIDCWellKnownEndpoints struct {
// GetOIDCWellKnownEndpointsFromIssuerURL gets the well known endpoints for the
// passed in issuer url
func GetOIDCWellKnownEndpointsFromIssuerURL(issuerURL string)
(*OIDCWellKnownEndpoints, error) {
+ if issuerURL == "" {
+ return nil, errors.New("required: issuer url")
+ }
u, err := url.Parse(issuerURL)
if err != nil {
return nil, errors.Wrap(err, "could not parse issuer url to
build well known endpoints")
}
+ if !u.IsAbs() {
+ return nil, errors.New("invalid: issuer url")
Review comment:
Is it possible to get a reason why the issue url is invalid and/or
include the invalid url within the error message?
##########
File path: oauth2/oidc_endpoint_provider.go
##########
@@ -36,10 +36,16 @@ type OIDCWellKnownEndpoints struct {
// GetOIDCWellKnownEndpointsFromIssuerURL gets the well known endpoints for the
// passed in issuer url
func GetOIDCWellKnownEndpointsFromIssuerURL(issuerURL string)
(*OIDCWellKnownEndpoints, error) {
+ if issuerURL == "" {
+ return nil, errors.New("required: issuer url")
Review comment:
maybe add a little more context "issuer url not provided" or "required
issuer url missing"?
--
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]