Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.cognitoidentity.model;
 
 
Container for the parameters to the GetOpenIdTokenForDeveloperIdentity operation.

Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the Logins map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users.

You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the IdentityId should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing IdentityId . This API will create the identity in the specified IdentityPoolId .

 
An identity pool ID in the format REGION:GUID.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

 
     private String identityPoolId;

    
A unique identifier in the format REGION:GUID.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

 
     private String identityId;

    
A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.

Constraints:
Length: 0 - 10

 
     private java.util.Map<String,Stringlogins;

    
The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.

Constraints:
Range: 1 - 86400

 
     private Long tokenDuration;

    
An identity pool ID in the format REGION:GUID.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

Returns:
An identity pool ID in the format REGION:GUID.
    public String getIdentityPoolId() {
        return ;
    }
    
    
An identity pool ID in the format REGION:GUID.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

Parameters:
identityPoolId An identity pool ID in the format REGION:GUID.
    public void setIdentityPoolId(String identityPoolId) {
        this. = identityPoolId;
    }
    
    
An identity pool ID in the format REGION:GUID.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

Parameters:
identityPoolId An identity pool ID in the format REGION:GUID.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = identityPoolId;
        return this;
    }

    
A unique identifier in the format REGION:GUID.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

Returns:
A unique identifier in the format REGION:GUID.
    public String getIdentityId() {
        return ;
    }
    
    
A unique identifier in the format REGION:GUID.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

Parameters:
identityId A unique identifier in the format REGION:GUID.
    public void setIdentityId(String identityId) {
        this. = identityId;
    }
    
    
A unique identifier in the format REGION:GUID.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

Parameters:
identityId A unique identifier in the format REGION:GUID.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = identityId;
        return this;
    }

    
A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.

Constraints:
Length: 0 - 10

Returns:
A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.
    public java.util.Map<String,StringgetLogins() {
        
        return ;
    }
    
    
A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.

Constraints:
Length: 0 - 10

Parameters:
logins A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.
    public void setLogins(java.util.Map<String,Stringlogins) {
        this. = logins;
    }
    
    
A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10

Parameters:
logins A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.
Returns:
A reference to this updated object so that method calls can be chained together.
        setLogins(logins);
        return this;
    }

    
A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.

The method adds a new key-value pair into Logins parameter, and returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10

Parameters:
key The key of the entry to be added into Logins.
value The corresponding value of the entry to be added into Logins.
    if (null == this.) {
      this. = new java.util.HashMap<String,String>();
    }
    if (this..containsKey(key))
      throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
    this..put(keyvalue);
    return this;
  }

  
Removes all the entries added into Logins.

Returns a reference to this object so that method calls can be chained together.

    this. = null;
    return this;
  }
  
    
The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.

Constraints:
Range: 1 - 86400

Returns:
The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.
    public Long getTokenDuration() {
        return ;
    }
    
    
The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.

Constraints:
Range: 1 - 86400

Parameters:
tokenDuration The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.
    public void setTokenDuration(Long tokenDuration) {
        this. = tokenDuration;
    }
    
    
The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 - 86400

Parameters:
tokenDuration The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = tokenDuration;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getIdentityPoolId() != nullsb.append("IdentityPoolId: " + getIdentityPoolId() + ",");
        if (getIdentityId() != nullsb.append("IdentityId: " + getIdentityId() + ",");
        if (getLogins() != nullsb.append("Logins: " + getLogins() + ",");
        if (getTokenDuration() != nullsb.append("TokenDuration: " + getTokenDuration() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getIdentityPoolId() == null) ? 0 : getIdentityPoolId().hashCode()); 
        hashCode = prime * hashCode + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); 
        hashCode = prime * hashCode + ((getLogins() == null) ? 0 : getLogins().hashCode()); 
        hashCode = prime * hashCode + ((getTokenDuration() == null) ? 0 : getTokenDuration().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof GetOpenIdTokenForDeveloperIdentityRequest == falsereturn false;
        
        if (other.getIdentityPoolId() == null ^ this.getIdentityPoolId() == nullreturn false;
        if (other.getIdentityPoolId() != null && other.getIdentityPoolId().equals(this.getIdentityPoolId()) == falsereturn false
        if (other.getIdentityId() == null ^ this.getIdentityId() == nullreturn false;
        if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == falsereturn false
        if (other.getLogins() == null ^ this.getLogins() == nullreturn false;
        if (other.getLogins() != null && other.getLogins().equals(this.getLogins()) == falsereturn false
        if (other.getTokenDuration() == null ^ this.getTokenDuration() == nullreturn false;
        if (other.getTokenDuration() != null && other.getTokenDuration().equals(this.getTokenDuration()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (GetOpenIdTokenForDeveloperIdentityRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X