Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for GetExpiryDuration (0.18 sec)

  1. internal/config/identity/tls/config.go

    }
    
    const (
    	defaultExpiry time.Duration = 1 * time.Hour
    	minExpiry     time.Duration = 15 * time.Minute
    	maxExpiry     time.Duration = 365 * 24 * time.Hour
    )
    
    // GetExpiryDuration - return parsed expiry duration.
    func (l Config) GetExpiryDuration(dsecs string) (time.Duration, error) {
    	if dsecs == "" {
    		return defaultExpiry, nil
    	}
    
    	d, err := strconv.Atoi(dsecs)
    	if err != nil {
    		return 0, auth.ErrInvalidDuration
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. internal/config/identity/ldap/ldap.go

    	if err != nil {
    		return nil, nil, err
    	}
    
    	return lookupResult, groups, nil
    }
    
    // GetExpiryDuration - return parsed expiry duration.
    func (l Config) GetExpiryDuration(dsecs string) (time.Duration, error) {
    	if dsecs == "" {
    		return l.stsExpiryDuration, nil
    	}
    
    	d, err := strconv.Atoi(dsecs)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 01:04:53 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  3. cmd/ftp-server-driver.go

    			}
    			ldapPolicies, _ := globalIAMSys.PolicyDBGet(lookupResult.NormDN, targetGroups...)
    			if len(ldapPolicies) == 0 {
    				return nil, errAuthentication
    			}
    			expiryDur, err := globalIAMSys.LDAPConfig.GetExpiryDuration("")
    			if err != nil {
    				return nil, err
    			}
    			claims := make(map[string]interface{})
    			claims[expClaim] = UTCNow().Add(expiryDur).Unix()
    
    			claims[ldapUser] = lookupResult.NormDN
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 14K bytes
    - Viewed (0)
  4. cmd/sts-handlers.go

    				ldapActualUserDN, strings.Join(groupDistNames, "`,`")))
    		return
    	}
    
    	expiryDur, err := globalIAMSys.LDAPConfig.GetExpiryDuration(r.Form.Get(stsDurationSeconds))
    	if err != nil {
    		writeSTSErrorResponse(ctx, w, ErrSTSInvalidParameterValue, err)
    		return
    	}
    
    	claims[expClaim] = UTCNow().Add(expiryDur).Unix()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 01:29:20 UTC 2024
    - 33.9K bytes
    - Viewed (0)
  5. cmd/sftp-server.go

    				return nil, errAuthentication
    			}
    		}
    		claims[ldapAttribPrefix+attribKey] = attribValue[0]
    	}
    
    	expiryDur, err := globalIAMSys.LDAPConfig.GetExpiryDuration("")
    	if err != nil {
    		return nil, err
    	}
    
    	claims[expClaim] = UTCNow().Add(expiryDur).Unix()
    	claims[ldapUserN] = user
    	claims[ldapUser] = lookupResult.NormDN
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 20 20:00:29 UTC 2024
    - 16K bytes
    - Viewed (0)
Back to top