Skip to content

GetDerivedTokenRequest

Source code in docs_src/capo_cognito_identity_provider/types/get_derived_token_request.py
class GetDerivedTokenRequest(TypedDict, closed=True):
    client_id: "capo_cognito_identity_provider.types.client_id_type.ClientIdType"
    """<p>The ID of the app client that requests the token exchange.</p>"""
    client_secret: NotRequired[
        "capo_cognito_identity_provider.types.client_secret_type.ClientSecretType"
    ]
    """<p>The client secret of the requested app client, if the client has a secret.</p>"""
    subject_token: "capo_cognito_identity_provider.types.get_derived_token_token_model_type.GetDerivedTokenTokenModelType"
    """<p>The token that you want to exchange for a new token. This is the credential that represents the identity of the party on behalf of whom the request is being made.</p>"""
    subject_token_type: "capo_cognito_identity_provider.types.token_type_identifier_type.TokenTypeIdentifierType"
    """<p>The type of the <code>SubjectToken</code> that you want to exchange. Valid values:</p> <ul> <li> <p> <code>ACCESS_TOKEN</code> – The subject token is an access token.</p> </li> <li> <p> <code>ID_TOKEN</code> – The subject token is an ID token.</p> </li> <li> <p> <code>SAML2</code> – The subject token is a SAML 2.0 assertion.</p> </li> </ul>"""
    subject_token_provider_name: NotRequired[
        "capo_cognito_identity_provider.types.provider_name_type.ProviderNameType"
    ]
    """<p>The name of the third-party identity provider that issued the <code>SubjectToken</code>, if the subject token isn't a Amazon Cognito token. Provide this value when your <code>SubjectToken</code> came from a SAML or OIDC provider that you registered with your user pool, so that Amazon Cognito can validate it against that provider's configuration. Omit this parameter for a Amazon Cognito ID or access token.</p>"""
    actor_token: NotRequired[
        "capo_cognito_identity_provider.types.get_derived_token_token_model_type.GetDerivedTokenTokenModelType"
    ]
    """<p>A token that identifies the intermediary service that is exchanging the token on behalf of the user. When you provide an <code>ActorToken</code>, the token that Amazon Cognito issues carries an <code>act</code> claim that identifies the intermediary, so that downstream services can distinguish a user acting directly from an intermediary acting on the user's behalf.</p>"""
    actor_token_type: NotRequired[
        "capo_cognito_identity_provider.types.token_type_identifier_type.TokenTypeIdentifierType"
    ]
    """<p>The type of the <code>ActorToken</code> that you provide. Required when you provide an <code>ActorToken</code>. Valid values:</p> <ul> <li> <p> <code>ACCESS_TOKEN</code> – The actor token is an access token.</p> </li> <li> <p> <code>ID_TOKEN</code> – The actor token is an ID token.</p> </li> <li> <p> <code>SAML2</code> – The actor token is a SAML 2.0 assertion.</p> </li> </ul>"""
    actor_token_provider_name: NotRequired[
        "capo_cognito_identity_provider.types.provider_name_type.ProviderNameType"
    ]
    """<p>The name of the third-party identity provider that issued the <code>ActorToken</code>, if the actor token isn't a Amazon Cognito token.</p>"""
    scopes: NotRequired[
        "capo_cognito_identity_provider.types.scope_list_type.ScopeListType"
    ]
    """<p>The scopes that you want the new token to have. Amazon Cognito issues a token with the intersection of these requested scopes, the scopes of your <code>SubjectToken</code>, and the scopes that are allowed for the requesting app client. If you don't specify any scopes, Amazon Cognito issues a token with the same scopes as your <code>SubjectToken</code>.</p>"""
    audiences: NotRequired[
        "capo_cognito_identity_provider.types.audience_list_type.AudienceListType"
    ]
    """<p>The logical name of the target service where you intend to use the issued token. You can't request both <code>Audiences</code> and <code>Resources</code> in the same request.</p>"""
    resources: NotRequired[
        "capo_cognito_identity_provider.types.resource_list_type.ResourceListType"
    ]
    """<p>The identifier of a resource server in your user pool where you intend to use the issued token. You can't request both <code>Resources</code> and <code>Audiences</code> in the same request.</p>"""
    requested_token_type: NotRequired[
        "capo_cognito_identity_provider.types.issued_token_type_identifier_type.IssuedTokenTypeIdentifierType"
    ]
    """<p>The type of token that you want Amazon Cognito to issue. Valid values:</p> <ul> <li> <p> <code>ACCESS_TOKEN</code> – Issues an access token.</p> </li> <li> <p> <code>ID_TOKEN</code> – Issues an ID token.</p> </li> </ul> <p>Amazon Cognito can't issue a SAML assertion, so <code>SAML2</code> isn't a valid value for this parameter.</p>"""

actor_token instance-attribute

actor_token: NotRequired[GetDerivedTokenTokenModelType]

A token that identifies the intermediary service that is exchanging the token on behalf of the user. When you provide an ActorToken, the token that Amazon Cognito issues carries an act claim that identifies the intermediary, so that downstream services can distinguish a user acting directly from an intermediary acting on the user's behalf.

actor_token_provider_name instance-attribute

actor_token_provider_name: NotRequired[ProviderNameType]

The name of the third-party identity provider that issued the ActorToken, if the actor token isn't a Amazon Cognito token.

actor_token_type instance-attribute

actor_token_type: NotRequired[TokenTypeIdentifierType]

The type of the ActorToken that you provide. Required when you provide an ActorToken. Valid values:

  • ACCESS_TOKEN – The actor token is an access token.

  • ID_TOKEN – The actor token is an ID token.

  • SAML2 – The actor token is a SAML 2.0 assertion.

audiences instance-attribute

audiences: NotRequired[AudienceListType]

The logical name of the target service where you intend to use the issued token. You can't request both Audiences and Resources in the same request.

client_id instance-attribute

client_id: ClientIdType

The ID of the app client that requests the token exchange.

client_secret instance-attribute

client_secret: NotRequired[ClientSecretType]

The client secret of the requested app client, if the client has a secret.

requested_token_type instance-attribute

requested_token_type: NotRequired[IssuedTokenTypeIdentifierType]

The type of token that you want Amazon Cognito to issue. Valid values:

  • ACCESS_TOKEN – Issues an access token.

  • ID_TOKEN – Issues an ID token.

Amazon Cognito can't issue a SAML assertion, so SAML2 isn't a valid value for this parameter.

resources instance-attribute

resources: NotRequired[ResourceListType]

The identifier of a resource server in your user pool where you intend to use the issued token. You can't request both Resources and Audiences in the same request.

scopes instance-attribute

scopes: NotRequired[ScopeListType]

The scopes that you want the new token to have. Amazon Cognito issues a token with the intersection of these requested scopes, the scopes of your SubjectToken, and the scopes that are allowed for the requesting app client. If you don't specify any scopes, Amazon Cognito issues a token with the same scopes as your SubjectToken.

subject_token instance-attribute

The token that you want to exchange for a new token. This is the credential that represents the identity of the party on behalf of whom the request is being made.

subject_token_provider_name instance-attribute

subject_token_provider_name: NotRequired[ProviderNameType]

The name of the third-party identity provider that issued the SubjectToken, if the subject token isn't a Amazon Cognito token. Provide this value when your SubjectToken came from a SAML or OIDC provider that you registered with your user pool, so that Amazon Cognito can validate it against that provider's configuration. Omit this parameter for a Amazon Cognito ID or access token.

subject_token_type instance-attribute

subject_token_type: TokenTypeIdentifierType

The type of the SubjectToken that you want to exchange. Valid values:

  • ACCESS_TOKEN – The subject token is an access token.

  • ID_TOKEN – The subject token is an ID token.

  • SAML2 – The subject token is a SAML 2.0 assertion.