Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for GetExpiryDuration (0.17 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
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  2. internal/config/identity/ldap/ldap.go

    	groups, err := l.LDAP.SearchForUserGroups(conn, username, bindDN)
    	if err != nil {
    		return "", nil, err
    	}
    
    	return bindDN, 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 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  3. cmd/sftp-server-driver.go

    			targetUser, targetGroups, err := globalIAMSys.LDAPConfig.LookupUserDN(f.AccessKey())
    			if err != nil {
    				return nil, err
    			}
    			expiryDur, err := globalIAMSys.LDAPConfig.GetExpiryDuration("")
    			if err != nil {
    				return nil, err
    			}
    			claims := make(map[string]interface{})
    			claims[expClaim] = UTCNow().Add(expiryDur).Unix()
    			for k, v := range f.permissions.CriticalOptions {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  4. cmd/sts-handlers.go

    				ldapUserDN, 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()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 21:31:13 GMT 2024
    - 34.7K bytes
    - Viewed (2)
  5. cmd/ftp-server-driver.go

    			}
    			ldapPolicies, _ := globalIAMSys.PolicyDBGet(targetUser, 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] = targetUser
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 13.6K bytes
    - Viewed (0)
Back to top