Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for SetExpiry (0.34 sec)

  1. internal/jwt/parser.go

    	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()
    }
    
    // SetAccessKey sets access key as jwt subject and custom
    // "accessKey" field.
    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)
  2. 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)
  3. 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)
  4. 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)
  5. src/main/java/org/codelibs/fess/job/PurgeThumbnailJob.java

            try {
                final long count = ComponentUtil.getThumbnailManager().purge(getExpiry());
                return "Deleted " + count + " thumbnail files.";
            } catch (final Exception e) {
                logger.error("Failed to purge thumbnails.", e);
                return e.getMessage();
            }
        }
    
        public long getExpiry() {
            return expiry;
        }
    
        public PurgeThumbnailJob expiry(final long expiry) {
    Java
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 1.5K bytes
    - Viewed (0)
Back to top