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

mindersec / minder / 14701580974

28 Apr 2025 06:20AM UTC coverage: 56.887%. First build
14701580974

Pull #5609

github

web-flow
Merge 1ba185623 into 4f29c3363
Pull Request #5609: build(deps): bump gitlab.com/gitlab-org/api/client-go from 0.127.0 to 0.128.0

18357 of 32269 relevant lines covered (56.89%)

36.93 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