public GetOpenIdTokenForDeveloperIdentityRequest withTokenDuration(Long tokenDuration) {
        setTokenDuration(tokenDuration);
        return this;
    }
<p>
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.
</p>
<note>
<p>
Please provide for a small grace period, usually no more than 5 minutes, to account for clock skew.
</p>
</note>

@param 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.</p> <note>
       <p>
       Please provide for a small grace period, usually no more than 5 minutes, to account for clock skew.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/GetOpenIdTokenForDeveloperIdentityRequest.java