Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for SetExpiry (0.16 sec)

  1. cmd/jwt.go

    }
    
    var cacheLRU = expirable.NewLRU[cacheKey, string](1000, nil, 15*time.Second)
    
    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))
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:45:14 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top