public class TokenStrategyImpl extends TokenStrategy
token处理策略
替换系统默认的token处理策略Oauth2Resource
收集,经过public void configure(ResourceServerSecurityConfigurer resources)
注入到oauth2中Oauth2Resource
Modifier and Type | Field and Description |
---|---|
protected org.springframework.security.oauth2.provider.token.TokenStore |
tokenStore |
Constructor and Description |
---|
TokenStrategyImpl() |
Modifier and Type | Method and Description |
---|---|
org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices |
getAuthorizationServerTokenServices() |
org.springframework.security.oauth2.provider.token.TokenStore |
getTokenStore() |
org.springframework.security.oauth2.provider.OAuth2Authentication |
loadAuthentication(String accessTokenValue) |
org.springframework.security.oauth2.common.OAuth2AccessToken |
readAccessToken(String accessToken) |
void |
setAuthorizationServerTokenServices(org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices authorizationServerTokenServices) |
void |
setTokenStore(org.springframework.security.oauth2.provider.token.TokenStore tokenStore) |
protected org.springframework.security.oauth2.provider.token.TokenStore tokenStore
public org.springframework.security.oauth2.provider.OAuth2Authentication loadAuthentication(String accessTokenValue) throws org.springframework.security.core.AuthenticationException, org.springframework.security.oauth2.common.exceptions.InvalidTokenException
org.springframework.security.core.AuthenticationException
org.springframework.security.oauth2.common.exceptions.InvalidTokenException
public org.springframework.security.oauth2.common.OAuth2AccessToken readAccessToken(String accessToken)
public void setTokenStore(org.springframework.security.oauth2.provider.token.TokenStore tokenStore)
public org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices getAuthorizationServerTokenServices()
public void setAuthorizationServerTokenServices(org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices authorizationServerTokenServices)
public org.springframework.security.oauth2.provider.token.TokenStore getTokenStore()
Copyright © 2021. All rights reserved.