【奈學(xué)】百萬后端架構(gòu)師千億級(jí)真實(shí)項(xiàng)目案例實(shí)戰(zhàn)營
2022-11-30 21:51 作者:娜娜絡(luò)絡(luò) | 我要投稿
? ?public Oauth2TokenDto getAccessToken(User principle, Map<String, String> params) throws HttpRequestMethodNotSupportedException {
? ? ? ?UsernamePasswordAuthenticationToken principal = new UsernamePasswordAuthenticationToken(principle,null,principle.getAuthorities());
? ? ? ?OAuth2AccessToken oAuth2AccessToken = tokenEndpoint.postAccessToken(principal, params).getBody();
? ? ? ?Oauth2TokenDto oauth2TokenDto = Oauth2TokenDto.builder()
? ? ? ? ? ? ? ?.token(oAuth2AccessToken.getValue())
? ? ? ? ? ? ? ?.refreshToken(oAuth2AccessToken.getRefreshToken().getValue())
? ? ? ? ? ? ? ?.expiresIn(oAuth2AccessToken.getEx
標(biāo)簽: