Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for MapClaims (0.06 sec)

  1. internal/jwt/parser.go

    // NewMapClaims - Initializes a new map claims
    func NewMapClaims() *MapClaims {
    	return &MapClaims{MapClaims: jwtgo.MapClaims{}}
    }
    
    // Set Adds new arbitrary claim keys and values.
    func (c *MapClaims) Set(key string, val interface{}) {
    	if c == nil {
    		return
    	}
    	c.MapClaims[key] = val
    }
    
    // Delete deletes a key named key.
    func (c *MapClaims) Delete(key string) {
    	if c == nil {
    		return
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 17 16:45:46 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  2. internal/config/identity/openid/jwt.go

    		}
    		return pubkey, nil
    	}
    
    	pCfg, ok := r.arnProviderCfgsMap[arn]
    	if !ok {
    		return fmt.Errorf("Role %s does not exist", arn)
    	}
    
    	mclaims := jwtgo.MapClaims(claims)
    	jwtToken, err := jp.ParseWithClaims(token, &mclaims, keyFuncCallback)
    	if err != nil {
    		// Re-populate the public key in-case the JWKS
    		// pubkeys are refreshed
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 02:46:36 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. cmd/auth-handler.go

    func mustGetClaimsFromToken(r *http.Request) map[string]interface{} {
    	claims, _ := getClaimsFromToken(getSessionToken(r))
    	return claims
    }
    
    func getClaimsFromTokenWithSecret(token, secret string) (*xjwt.MapClaims, error) {
    	// JWT token for x-amz-security-token is signed with admin
    	// secret key, temporary credentials become invalid if
    	// server admin credentials change. This is done to ensure
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 17 16:45:46 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  4. cmd/sts-handlers_test.go

    		}
    
    		// Validate claims. Check if the sshPublicKey claim is present.
    		dnClaim := claims.MapClaims[ldapActualUser].(string)
    		if dnClaim != testCase.dn {
    			c.Fatalf("Test %d: unexpected dn claim: %s", i+1, dnClaim)
    		}
    		sshPublicKeyClaim := claims.MapClaims[ldapAttribPrefix+"sshPublicKey"].([]interface{})[0].(string)
    		if sshPublicKeyClaim == "" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 10 23:40:37 UTC 2024
    - 97.1K bytes
    - Viewed (0)
  5. cmd/iam.go

    	return tmpAcc, embeddedPolicy, nil
    }
    
    // getAccountWithClaims - gets information about an account with claims
    func (sys *IAMSys) getAccountWithClaims(ctx context.Context, accessKey string) (UserIdentity, *jwt.MapClaims, error) {
    	if !sys.Initialized() {
    		return UserIdentity{}, nil, errServerNotInitialized
    	}
    
    	acc, ok := sys.store.GetUser(accessKey)
    	if !ok {
    		return UserIdentity{}, nil, errNoSuchAccount
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 29 16:01:48 UTC 2024
    - 74.6K bytes
    - Viewed (0)
  6. cmd/iam-store.go

    		// non-empty session tokens.
    		if !(cred.IsServiceAccount() || cred.IsTemp()) ||
    			cred.SessionToken == "" {
    			continue
    		}
    
    		var (
    			err    error
    			claims *jwt.MapClaims
    		)
    
    		if cred.IsServiceAccount() {
    			claims, err = getClaimsFromTokenWithSecret(cred.SessionToken, cred.SecretKey)
    		} else if cred.IsTemp() {
    			var secretKey string
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Oct 14 16:35:37 UTC 2024
    - 83.2K bytes
    - Viewed (0)
Back to top