MCPcopy Index your code
hub / github.com/coder/coder / Validate

Method Validate

coderd/jwtutils/jws.go:23–32  ·  view source on GitHub ↗
(e jwt.Expected)

Source from the content-addressed store, hash-verified

21type RegisteredClaims jwt.Claims
22
23func (r RegisteredClaims) Validate(e jwt.Expected) error {
24 if r.Expiry == nil {
25 return xerrors.Errorf("expiry is required")
26 }
27 if e.Time.IsZero() {
28 return xerrors.Errorf("expected time is required")
29 }
30
31 return (jwt.Claims(r)).Validate(e)
32}
33
34// Claims defines the payload for a JWT. Most callers
35// should embed jwt.Claims

Callers

nothing calls this directly

Calls 3

ValidateMethod · 0.65
ErrorfMethod · 0.45
IsZeroMethod · 0.45

Tested by

no test coverage detected