Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for updateClaimsExpiry (0.23 sec)

  1. internal/config/identity/openid/jwt_test.go

    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			claims := map[string]interface{}{}
    			claims["exp"] = testCase.exp
    			err := updateClaimsExpiry(testCase.dsecs, claims)
    			if err != nil && !testCase.expectedFailure {
    				t.Errorf("Expected success, got failure %s", err)
    			}
    			if err == nil && testCase.expectedFailure {
    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)
  2. internal/config/identity/openid/jwt.go

    		return errors.New(resp.Status)
    	}
    
    	return r.pubKeys.parseAndAdd(resp.Body)
    }
    
    // ErrTokenExpired - error token expired
    var (
    	ErrTokenExpired = errors.New("token expired")
    )
    
    func updateClaimsExpiry(dsecs string, claims map[string]interface{}) error {
    	expStr := claims["exp"]
    	if expStr == "" {
    		return ErrTokenExpired
    	}
    
    	// No custom duration requested, the claims can be used as is.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Nov 16 04:42:31 GMT 2023
    - 8.3K bytes
    - Viewed (5)
Back to top