Compose:從上手到進(jìn)階再到高手-2022正式版
import org.springframework.security.oauth2.provider.endpoint.TokenEndpoint;@Componentpublic class AuthTokenComponent {
? ?@Autowired
? ?private TokenEndpoint tokenEndpoint;
? ?public Oauth2TokenDto getAccessToken(String clientId, String clientSecurity , List<GrantedAuthority> grantedAuthorities, Map<String, String> params) throws HttpRequestMethodNotSupportedException {
? ? ? ?User principle = new User(clientId,clientSecurity,true,true,true,true,grantedAuthorities);
? ? ? return getAccessToken(principle,params);
標(biāo)簽: