简体   繁体   English

Spring Security用什么来生成OAuth2令牌?

[英]What Spring Security uses to generate OAuth2 tokens?

How Spring Security generates the security token or what algorithms it follows to generate the OAuth2 token? Spring Security如何生成安全令牌,或者遵循什么算法生成OAuth2令牌?

We can use JWT or open-id, etc. as an authorization token but by default what it uses? 我们可以使用JWT或open-id等作为授权令牌,但默认情况下它使用的是什么?

If your are using Spring Security OAuth2 as an authorization server then the default for authorization code is a random value, see RandomValueAuthorizationCodeServices : 如果您将Spring Security OAuth2用作授权服务器,则授权代码的默认值为随机值,请参见RandomValueAuthorizationCodeServices

Base implementation for authorization code services that generates a random-value authorization code. 授权代码服务的基本实现,该服务生成一个随机值授权代码。

and the default for access token and refresh token is a random UUID, see DefaultTokenServices : 访问令牌和刷新令牌的默认值是一个随机UUID,请参见DefaultTokenServices

Base implementation for token services using random UUID values for the access token and refresh token values. 使用随机UUID值作为访问令牌和刷新令牌值的令牌服务的基本实现。

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

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