【文件属性】:
文件名称:spring-webflux-security-jwt:使用Spring Reactive Webflux,Spring Boot 2和Spring Security 5的JWT授权和认证实现
文件大小:83KB
文件格式:ZIP
更新时间:2021-01-30 05:13:54
jwt reactive spring-boot spring-security jwt-authentication
使用JWT与Spring WebFlux和Spring Security Reactive进行身份验证和授权
首先阅读的好文档
在开始之前,我建议您先阅读下一份参考
启用Spring WebFlux安全性
在你的应用程序首先使Webflux安全@EnableWebFluxSecurity
@SpringBootApplication
@EnableWebFluxSecurity
public class SecuredRestApplication {
....
}
创建一个InMemory UserDetailsService
定义一个自定义UserDetailsService bean,在其中添加具有密码和初始角色的User:
@Bean
public MapReactiveUserDetailsService userDetailsRepository() {
UserDetails user = User . withDefaultPasswordEncoder()
.username( " user " )
【文件预览】:
spring-webflux-security-jwt-master
----gradlew(5KB)
----settings.gradle(41B)
----src()
--------test()
--------main()
----gradle()
--------wrapper()
----README.md(10KB)
----gradlew.bat(2KB)
----pom.xml(2KB)
----build.gradle(893B)
网友评论
相关文章
- spring Security jwt授权和认证.rar
- spring-boot-webflux-reactive-mongo:使用Spring Boot 2,Spring Data Mongo-Db Reactive,Spring Boot Webflux,Spring Security Webflux,功能路由创建的示例项目
- spring-boot-webflux-jjwt:示例Spring Boot和带有Spring Security和JWT的WebFlux(响应式Web),用于令牌认证和授权
- spring-boot-reactive-example:Java Spring-boot Reactive(WebFlux)