简体   繁体   English

具有两步登录功能的Spring Boot OAuth2授权服务器

[英]Spring Boot OAuth2 Authorization Server with 2 step login

I'm trying to set up a small micro-service style project using Spring Boot and OAuth2 with JWT. 我正在尝试使用带有JWT的Spring Boot和OAuth2建立一个小型的微服务风格项目。

Here's the flow I would like: 这是我想要的流程:

-> user clicks login and is taken to login page on Auth server
-> user logs in
-> user selects or creates a profile
-> login returns with the selected profile as part of the JWT

I know how to populate additional data in the JWT token but where I'm lost is the 2-step login. 我知道如何在JWT令牌中填充其他数据,但丢失的是两步登录。

Previously in monolithic Spring with traditional Spring Security I would do something like have a filter check for the presence of a cookie containing the current profile and if not present redirect to the "select/make a profile" screen. 以前,在具有传统Spring Security的整体式Spring中,我会做一些事情,例如进行过滤器检查是否包含当前配置文件的cookie,如果不存在,则重定向到“选择/创建配置文件”屏幕。

TIA TIA

Maybe you can find some inspiration here . 也许您可以在这里找到一些灵感。 This repository contains example projects containing some common use cases for OAuth2. 该存储库包含示例项目,其中包含OAuth2的一些常见用例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM