没有OAuth的Spring Security JWT [英] Spring security JWT without OAuth

查看:78
本文介绍了没有OAuth的Spring Security JWT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我开始学习如何使用oauth 2.0 + jwt配置spring boot,但我有一个问题:是否可以使用spring boot security + jwt来避免oauth 2.0?

Recently I started learn how to configure spring boot with oauth 2.0 + jwt, and I have a question: is it possible to use spring boot security + jwt avoiding oauth 2.0?

推荐答案

是的,可以使用 JWT 功能,而无需使用标准化的 OAuth 2.0 流.此处是帮助您解决问题的一个很好的示例.可以在 AUTH0 中找到另一个示例.例如,您可以使用以下依赖项:

Yes, it is possible to use JWT functionalities without the usage of standardized OAuth 2.0 flows. Here is a good example implementation to help you out. Another example can be found at AUTH0. You can use for example this dependency:

<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-jwt -->
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-jwt</artifactId>
    <version>1.0.9.RELEASE</version>
</dependency>

这篇关于没有OAuth的Spring Security JWT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆