MCPcopy Create free account
hub / github.com/cloudbase/garm / getJWT

Method getJWT

params/github.go:360–368  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

358}
359
360func (a RunnerScaleSetSession) getJWT() (*jwt.Token, error) {
361 // We're parsing a token we got from the GitHub API. We can't verify its signature.
362 // We do need the expiration date however, or other info.
363 token, _, err := jwt.NewParser().ParseUnverified(a.MessageQueueAccessToken, &jwt.RegisteredClaims{})
364 if err != nil {
365 return nil, fmt.Errorf("failed to parse jwt token: %w", err)
366 }
367 return token, nil
368}
369
370func (a RunnerScaleSetSession) ExiresAt() (time.Time, error) {
371 jwt, err := a.getJWT()

Callers 1

ExiresAtMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected