| 1 |
package fake |
| 2 |
|
| 3 |
import "github.com/golang-jwt/jwt/v4" |
| 4 |
|
| 5 |
// Verify that Claims implements jwt.Claims. |
| 6 |
var _ jwt.Claims = Claims{} |
| 7 |
|
| 8 |
// Claims contains information to be formatted into a fake JWT. |
| 9 |
type Claims struct { |
| 10 |
jwt.RegisteredClaims |
| 11 |
ContainerImageSignatures []ContainerImageSignatureClaims `json:"container_image_signatures"` |
| 12 |
MachineStateMarshaled string |
| 13 |
OEMID string `json:"oemid"` |
| 14 |
HWModel string `json:"hwmodel"` |
| 15 |
SecBoot bool `json:"secboot"` |
| 16 |
SWName string `json:"swname"` |
| 17 |
} |
| 18 |
|
| 19 |
// ContainerImageSignatureClaims contains claims about a container image signature. |
| 20 |
type ContainerImageSignatureClaims struct { |
| 21 |
Payload string `json:"payload"` |
| 22 |
Signature string `json:"signature"` |
| 23 |
PubKey string `json:"public_key"` |
| 24 |
SigAlg string `json:"signature_algorithm"` |
| 25 |
} |
| 26 |
|
| 27 |
// Valid is necessary to implement the jwt.Claims interface. |
| 28 |
func (c Claims) Valid() error { |
| 29 |
return nil |
| 30 |
} |