Add audience in error.

This commit is contained in:
Mariano Cano 2019-03-18 10:57:29 -07:00
parent 60880d1f0a
commit f8fba4df6b

View File

@ -55,7 +55,7 @@ func (a *Authority) Authorize(ott string) ([]provisioner.SignOption, error) {
// This method will also validate the audiences for JWK provisioners. // This method will also validate the audiences for JWK provisioners.
p, ok := a.provisioners.LoadByToken(token, &claims.Claims) p, ok := a.provisioners.LoadByToken(token, &claims.Claims)
if !ok { if !ok {
return nil, &apiError{errors.New("authorize: provisioner not found or invalid audience"), return nil, &apiError{errors.Errorf("authorize: provisioner not found or invalid audience %s", claims.Audience),
http.StatusUnauthorized, errContext} http.StatusUnauthorized, errContext}
} }