|
|
@ -93,6 +93,7 @@ public class JwtTokenProvider {
|
|
|
|
.authorizationType(JwtToken.HEADER_NAME.getCode())
|
|
|
|
.authorizationType(JwtToken.HEADER_NAME.getCode())
|
|
|
|
.accessToken(accessToken)
|
|
|
|
.accessToken(accessToken)
|
|
|
|
.accessTokenExpiresIn(accessTokenExpiresIn.getTime())
|
|
|
|
.accessTokenExpiresIn(accessTokenExpiresIn.getTime())
|
|
|
|
|
|
|
|
.refreshTokenExpiresIn(refreshTokenExpiresIn.getTime())
|
|
|
|
.refreshToken(refreshToken)
|
|
|
|
.refreshToken(refreshToken)
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -167,7 +168,7 @@ public class JwtTokenProvider {
|
|
|
|
public String resolveAccessToken(HttpServletRequest request) {
|
|
|
|
public String resolveAccessToken(HttpServletRequest request) {
|
|
|
|
String bearerToken = request.getHeader(JwtToken.HEADER_NAME.getCode());
|
|
|
|
String bearerToken = request.getHeader(JwtToken.HEADER_NAME.getCode());
|
|
|
|
if (StringUtils.hasText(bearerToken) && bearerToken.startsWith(JwtToken.GRANT_TYPE.getCode())) {
|
|
|
|
if (StringUtils.hasText(bearerToken) && bearerToken.startsWith(JwtToken.GRANT_TYPE.getCode())) {
|
|
|
|
return bearerToken.substring(JwtToken.GRANT_TYPE.getCode().length()+1);
|
|
|
|
return bearerToken.substring(JwtToken.GRANT_TYPE.getCode().length()+2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|