Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update error message #43

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading