Skip to content

Commit

Permalink
update error message (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato authored Jan 23, 2024
1 parent e84200d commit bf62625
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/octosts/trust_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (tp *TrustPolicy) CheckToken(token *oidc.IDToken) error {
// Check the issuer.
if tp.issuerPattern != nil {
if !tp.issuerPattern.MatchString(token.Issuer) {
return fmt.Errorf("trust policy: issuer %q did not match %q", token.Issuer, tp.IssuerPattern)
return fmt.Errorf("trust policy: issuer_pattern %q did not match %q", token.Issuer, tp.IssuerPattern)
}
} else if tp.Issuer != "" {
if token.Issuer != tp.Issuer {
Expand All @@ -85,7 +85,7 @@ func (tp *TrustPolicy) CheckToken(token *oidc.IDToken) error {
// Check the subject.
if tp.subjectPattern != nil {
if !tp.subjectPattern.MatchString(token.Subject) {
return fmt.Errorf("trust policy: subject %q did not match %q", token.Subject, tp.SubjectPattern)
return fmt.Errorf("trust policy: subject_pattern %q did not match %q", token.Subject, tp.SubjectPattern)
}
} else if tp.Subject != "" {
if token.Subject != tp.Subject {
Expand Down

0 comments on commit bf62625

Please sign in to comment.