0

我正在尝试使用 AWS CDK 创建 AWS 用户池客户端。我正在使用 python 代码执行此操作。下面是我的代码-

oAuthScopes = ["access-db-data"]
    supportedIdentityProviders = ["COGNITO"]
    allowedOAuthFlows = ["Token"]

    cognito_userpool_clients = _cognito.CfnUserPoolClient(stack, id="user-pool-client-id", user_pool_id="****", client_name="client-name", 
            generate_secret=True, allowed_o_auth_scopes=oAuthScopes, supported_identity_providers=supportedIdentityProviders, allowed_o_auth_flows=allowedOAuthFlows, allowed_o_auth_flows_user_pool_client=True)

我尝试了 allowedOAuthFlows 值的不同选项,如“TOKEN”、“token”、“CODE”、“Code”、“code”。仍然无法正常工作。对于上面的代码,我得到以下错误 -

validation error detected: Value '[Token]' at 'allowedOAuthFlows' failed to satisfy constraint: Member must satisfy constraint: [Member must satisfy enum value set: [implicit, client_credentials, code]] (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: InvalidParameterException;

我不知道这里出了什么问题。我将此链接称为 - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-allowedoauthflows

4

1 回答 1

0

解决方案 - 我已将其值更新为“client_credentials”并且它有效。

于 2019-12-11T14:59:14.700 回答