4Manuals

  • PDF Cloud HOME

如何为用于身份验证的AWS管理员API启用用户名密码身份验证 Download

    春季启动-Couchbase AbstractCouchbaseConfiguration-如何避免覆盖不必要的方法 我不知道(未解决的编译问题:) Lambda-将源IP传递给自定义授权者 如何在react图表上的datakey中操作DateTime 加载数据并推送到未显示的RecyclerView中 调用Model类的函数时出现java.lang.NullPointerException 字符串数组在for循环中初始化时忽略索引0 Spring MVC @ModelAttribute未填充AJAX发布请求 Golang服务器无法从远程REST API获取所有JSON 需要建议在Java中使用哪个数据库/存储来存储RaftLogs(实现Raft Consensus Algorithm)

我正在研究AWS和Cognito,并尝试在AWS Java api的帮助下创建User Pool及其客户端。使用这些api可以成功创建UserPool和App客户端。 但是我想设置两个选项,但在API中找不到任何选项来启用它们。

第一个选项是:启用用户名密码验证...

enter image description here

第二个选项是:认知用户池

enter image description here

以下是创建Appclient的Java代码

private UserPoolClientType createUserPoolAppClient(String userPoolId) {
        CreateUserPoolClientRequest request = new CreateUserPoolClientRequest();
        request.setUserPoolId(userPoolId);
        request.setClientName(userPoolId);
        request.setGenerateSecret(false);
        request.setAllowedOAuthFlowsUserPoolClient(true);

        List<String> callbackURLs = new ArrayList<>();
        callbackURLs.add("http://localhost:8080");
        request.setCallbackURLs(callbackURLs);

        List<String> allowedOAuthFlows = new ArrayList<>();
        allowedOAuthFlows.add("code");
        allowedOAuthFlows.add("implicit");

        request.setAllowedOAuthFlows(allowedOAuthFlows);

        List<String> allowedOAuthScops = new ArrayList<>();
        allowedOAuthScops.add("phone");
        allowedOAuthScops.add("openid");
        allowedOAuthScops.add("aws.cognito.signin.user.admin");

        request.setAllowedOAuthScopes(allowedOAuthScops);
        request.setAllowedOAuthFlowsUserPoolClient(true);

        return getAmazonCognitoIdentityClient().createUserPoolClient(request).getUserPoolClient();
    }

有人可以帮助我使用AWS Java API设置这两个选项的值。

先谢谢了。

0 个答案:

没有答案



Similar searches
    如何在Node.js Lambda AWS中的httpget请求中获取mysql数据 如何使用浮点值动态创建矩形? 如何在NHibernate中执行尝试删除? Samsung RB215ACPN Refrigerator User Manual 我不了解此错误,我需要帮助解决此错误吗?