【问题标题】:Angular spring boot and aws cognito integrationAngular Spring Boot 和 aws cognito 集成
【发布时间】:2020-08-27 05:28:19
【问题描述】:

我是 aws 环境的新手,需要您的帮助。

我正在做一个项目:

-on the frontend: an angular app  deployed on S3 and accessible via cloudfront

-on the backend: a monolithic application with spring boot and deployed on beanstalk

-authentication: aws cognito

-a database on RDS to store some informations about the user as the username and the role, 
the other informations are kept in aws cognito as user attributes like name, email, tel...

所以我的问题是:

-我们应该在哪里调用 cognito 来验证用户身份?在前端或对后端进行休息调用,它会自称为aws?

-我们需要这种配置的api网关吗?

请帮帮我!

【问题讨论】:

    标签: angular spring-boot aws-api-gateway amazon-cognito


    【解决方案1】:

    最有效的方法是在后端检查身份验证,并将您的前端放在网关后面。在前端,您可以在 cookie 中维护一个 sessionId,当用户导航到前端时,他们会通过验证会话的网关,如果无效,它将重定向用户登录。成功登录后,网关会将用户重定向到前端。所有 API 请求也会通过网关,网关会检索会话详细信息和令牌以用于 API 调用

    【讨论】:

      猜你喜欢
      • 2021-08-28
      • 1970-01-01
      • 2019-03-26
      • 1970-01-01
      • 1970-01-01
      • 2023-03-08
      • 2018-05-16
      • 2018-11-01
      • 1970-01-01
      相关资源
      最近更新 更多