• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mindersec / minder / 13912518563

18 Mar 2025 12:19AM UTC coverage: 56.561% (+0.006%) from 56.555%
13912518563

Pull #5518

github

web-flow
Merge 4b09b9980 into a1767e80d
Pull Request #5518: build(deps): bump github.com/containerd/containerd from 1.7.25 to 1.7.27 in /tools

18177 of 32137 relevant lines covered (56.56%)

37.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/internal/auth/jwt/merged/merged_jwt.go
1
// SPDX-FileCopyrightText: Copyright 2025 The Minder Authors
2
// SPDX-License-Identifier: Apache-2.0
3

4
// Package merged provides the logic for reading and validating JWT tokens
5
package merged
6

7
import (
8
        "fmt"
9

10
        "github.com/lestrrat-go/jwx/v2/jwt/openid"
11

12
        minder_jwt "github.com/mindersec/minder/internal/auth/jwt"
13
)
14

15
// Validator is a struct that combines multiple JWT validators.
16
type Validator struct {
17
        Validators []minder_jwt.Validator
18
}
19

20
var _ minder_jwt.Validator = (*Validator)(nil)
21

22
// ParseAndValidate implements jwt.Validator.
23
func (m Validator) ParseAndValidate(tokenString string) (openid.Token, error) {
×
24
        for _, v := range m.Validators {
×
25
                t, err := v.ParseAndValidate(tokenString)
×
26
                if err == nil {
×
27
                        return t, nil
×
28
                }
×
29
        }
30
        return nil, fmt.Errorf("no validator could parse and validate the token")
×
31
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc