- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for SetAudience (0.3 sec)
-
cmd/jwt.go
func authenticateNode(accessKey, secretKey, audience string) (string, error) { claims := xjwt.NewStandardClaims() claims.SetExpiry(UTCNow().Add(defaultInterNodeJWTExpiry)) claims.SetAccessKey(accessKey) claims.SetAudience(audience) jwt := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, claims) return jwt.SignedString([]byte(secretKey)) } // Check if the request is authenticated.
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Apr 19 16:45:14 GMT 2024 - 5.4K bytes - Viewed (0) -
internal/jwt/parser.go
return &StandardClaims{} } // SetIssuer sets issuer for these claims func (c *StandardClaims) SetIssuer(issuer string) { c.Issuer = issuer } // SetAudience sets audience for these claims func (c *StandardClaims) SetAudience(aud string) { c.Audience = aud } // SetExpiry sets expiry in unix epoch secs func (c *StandardClaims) SetExpiry(t time.Time) { c.ExpiresAt = t.Unix() }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue May 09 07:53:08 GMT 2023 - 13.9K bytes - Viewed (0)