MCPcopy
hub / github.com/smallstep/cli / DefaultClaims

Function DefaultClaims

token/token.go:118–130  ·  view source on GitHub ↗

DefaultClaims returns the default claims of any token.

()

Source from the content-addressed store, hash-verified

116
117// DefaultClaims returns the default claims of any token.
118func DefaultClaims() *Claims {
119 now := time.Now().UTC()
120 return &Claims{
121 Claims: jose.Claims{
122 Issuer: DefaultIssuer,
123 Audience: jose.Audience{DefaultAudience},
124 Expiry: jose.NewNumericDate(now.Add(DefaultValidity)),
125 NotBefore: jose.NewNumericDate(now),
126 IssuedAt: jose.NewNumericDate(now),
127 },
128 ExtraClaims: make(map[string]interface{}),
129 }
130}
131
132// GenerateKeyID returns the SHA256 of a public key.
133func GenerateKeyID(priv interface{}) (string, error) {

Callers 3

TestNewFunction · 0.92
TestNewClaimsFunction · 0.85
NewClaimsFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestNewFunction · 0.74
TestNewClaimsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…