Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. cmd/jwt_test.go

    	"os"
    	"testing"
    
    	jwtgo "github.com/golang-jwt/jwt/v4"
    	xjwt "github.com/minio/minio/internal/jwt"
    )
    
    func getTokenString(accessKey, secretKey string) (string, error) {
    	claims := xjwt.NewMapClaims()
    	claims.SetExpiry(UTCNow().Add(defaultJWTExpiry))
    	claims.SetAccessKey(accessKey)
    	token := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, claims)
    	return token.SignedString([]byte(secretKey))
    }
    
    // Tests web request authenticator.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:45:14 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  2. internal/config/identity/openid/jwt_test.go

    	claimsMap := jwtm.NewMapClaims()
    	claimsMap.SetExpiry(time.Now().Add(time.Minute))
    	claimsMap.SetAccessKey("test-access")
    	if err := updateClaimsExpiry("3600", claimsMap.MapClaims); err != nil {
    		t.Error(err)
    	}
    	// Build simple token with updated expiration claim
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.3K bytes
    - Viewed (0)
Back to top