aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/auth/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/auth/auth.go')
-rw-r--r--pkg/auth/auth.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go
index c662218ea..af8432a34 100644
--- a/pkg/auth/auth.go
+++ b/pkg/auth/auth.go
@@ -78,6 +78,9 @@ func (auth *Endpoint) queryTokenInfo(tokenValue string) (*jwtClaims, error) {
return nil, err
}
defer resp.Body.Close()
+ if resp.StatusCode != http.StatusOK {
+ return nil, fmt.Errorf("verification failed %v", resp.StatusCode)
+ }
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
@@ -116,7 +119,7 @@ func (auth *Endpoint) DetermineAuthSubj(now time.Time, authHeader []string) (str
return "", err
}
if claims.Audience != DashboardAudience {
- err := fmt.Errorf("unexpected audience %v %v", claims.Audience, claims)
+ err := fmt.Errorf("unexpected audience %v", claims.Audience)
return "", err
}
if claims.Expiration.Before(now) {