spring - Cognito 自定义消息并包含用户属性

标签 spring amazon-web-services spring-boot aws-java-sdk aws-cognito

我们正在运行一个基于 Spring 的项目,使用 Cognito 作为识别服务。

我们有一个项目要求为 Cognito 用户池中的用户自定义验证电子邮件和邀请电子邮件。 (见 here for the AWS doc )

默认验证消息:

Your verification code is {####}.



默认邀请消息:

Your username is {username} and temporary password is {####}.



我们想包括 email , phone_numbername将用户属性添加到这些电子邮件中。是否有可能做到这一点?我搜索了文档但无济于事 - 并且真的需要一些建议。

最佳答案

更新:我认为正确的方法是使用 Custom Message Cognito Lambda 触发器(需要实现一个功能)。然后您就可以访问所有userAttributes .
文档:https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-message.html

关于spring - Cognito 自定义消息并包含用户属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41891501/

相关文章:

amazon-web-services - 如何运行现有的 aws 放大项目

amazon-web-services - 如何使用 swagger 和 Rest Api 添加 Lambda 触发器?

java - Apache Camel 与 Kafka Producer 的内存泄漏

java - jboss 上的 spring boot 应用程序未运行

java - 使用 azure.keyvault.secret.property-sources 时 Spring Boot 应用程序启动失败并丢失日志

amazon-web-services - 适用于 DynamoDb bool 和列表数据类型的 AWS CloudFormation AttributeType

spring - 是否可以在没有 Redis 的情况下使用 Spring Boot session ?

mongodb - 使用mongodb+srv配置Mongo

java - 无法获取 Jedis 连接,无法从池中获取资源

java - 如果满足某些条件,如何在启动过程中退出spring应用程序?