parent
23178477c6
commit
0300588111
@ -0,0 +1,27 @@
|
||||
package com.mashibing.apipassenger.controller;
|
||||
|
||||
import com.mashibing.apipassenger.service.TokenService;
|
||||
import com.mashibing.internalcommon.dto.ResponseResult;
|
||||
import com.mashibing.internalcommon.response.TokenResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class TokenController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
@PostMapping("/token-refresh")
|
||||
public ResponseResult getTokenRefresh(@RequestBody TokenResponse tokenResponse){
|
||||
|
||||
String refreshTokenSrc = tokenResponse.getRefreshToken();
|
||||
System.out.println("refreshTokenSrc = " + refreshTokenSrc);
|
||||
|
||||
return tokenService.refreshToken(refreshTokenSrc);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue