Merge remote-tracking branch 'origin/service-accounts' into service-accounts
This commit is contained in:
commit
d97df8a9b2
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ type Claims interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrParse = errors.New("")
|
ErrParse = errors.New("parsing of request failed")
|
||||||
ErrIssuerInvalid = errors.New("issuer does not match")
|
ErrIssuerInvalid = errors.New("issuer does not match")
|
||||||
ErrAudience = errors.New("audience is not valid")
|
ErrAudience = errors.New("audience is not valid")
|
||||||
ErrAzpMissing = errors.New("authorized party is not set. If Token is valid for multiple audiences, azp must not be empty")
|
ErrAzpMissing = errors.New("authorized party is not set. If Token is valid for multiple audiences, azp must not be empty")
|
||||||
|
@ -131,7 +131,7 @@ func CheckAuthorizedParty(claims Claims, clientID string) error {
|
||||||
func CheckSignature(ctx context.Context, token string, payload []byte, claims Claims, supportedSigAlgs []string, set KeySet) error {
|
func CheckSignature(ctx context.Context, token string, payload []byte, claims Claims, supportedSigAlgs []string, set KeySet) error {
|
||||||
jws, err := jose.ParseSigned(token)
|
jws, err := jose.ParseSigned(token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return ErrParse
|
||||||
}
|
}
|
||||||
if len(jws.Signatures) == 0 {
|
if len(jws.Signatures) == 0 {
|
||||||
return ErrSignatureMissing
|
return ErrSignatureMissing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue