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

Method Validate

coderd/workspaceapps/token.go:65–74  ·  view source on GitHub ↗
(ex jwt.Expected)

Source from the content-addressed store, hash-verified

63}
64
65func (e EncryptedAPIKeyPayload) Validate(ex jwt.Expected) error {
66 if e.NotBefore == nil {
67 return xerrors.Errorf("not before is required")
68 }
69
70 ex.Issuer = "coderd"
71 ex.AnyAudience = jwt.Audience{"wsproxy"}
72
73 return e.RegisteredClaims.Validate(ex)
74}
75
76// FromRequest returns the signed token from the request, if it exists and is
77// valid. The caller must check that the token matches the request.

Callers

nothing calls this directly

Calls 2

ValidateMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected