Former-commit-id: 50fd812afcf010aef5b1c2d12985e481b8580ab4
master
wangbing 5 years ago
parent 2db8190b5b
commit a52b0e09d0

@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
</#if> </#if>
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching; import ${basePackage}.frame.auth.LocalData;
@SpringBootApplication @SpringBootApplication
<#if multiDB> <#if multiDB>
@ -24,6 +24,6 @@ public class Application extends SpringBootServletInitializer {
} }
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(Application.class, args); LocalData.setApplicationContext(SpringApplication.run(Application.class, args));
} }
} }

@ -113,10 +113,12 @@ public class GlobalController implements ErrorController {
case 404: case 404:
return "404"; return "404";
case 403: case 403:
try { if (LocalData.getToken() == null) {
response.sendRedirect("/login.htm"); try {
} catch (IOException e) { response.sendRedirect("/login.htm");
e.printStackTrace(); } catch (IOException e) {
e.printStackTrace();
}
} }
return "403"; return "403";
case 500: case 500:

@ -32,11 +32,11 @@ import java.util.regex.Pattern;
@EnableGlobalMethodSecurity(securedEnabled = true) @EnableGlobalMethodSecurity(securedEnabled = true)
public class SecurityConfig extends WebSecurityConfigurerAdapter { public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Value("${r"${web.url.auth.included}"}") @Value("${r'${web.url.auth.included}'}")
private String[] included; private String[] included;
@Value("${r"${web.url.auth.excluded}"}") @Value("${r'${web.url.auth.excluded}'}")
private String[] excluded; private String[] excluded;
@Value("${r"${spring.mvc.static-path-pattern}"}") @Value("${r'${spring.mvc.static-path-pattern}'}")
private String[] staticPath; private String[] staticPath;
@Value("${r'${web.login.page}'}") @Value("${r'${web.login.page}'}")
private String loginPage; private String loginPage;
@ -51,8 +51,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and() .and()
.addFilterBefore(new TokenFilter(), FilterSecurityInterceptor.class)// 过滤器用于处理Token .addFilterBefore(new TokenFilter(), FilterSecurityInterceptor.class)// 过滤器用于处理Token
.formLogin().loginPage(loginPage) .authorizeRequests()
.and().authorizeRequests()
.antMatchers(excluded).permitAll()// 放行排除的URL .antMatchers(excluded).permitAll()// 放行排除的URL
.antMatchers(included).access("@Authorization.hasPermission(request,authentication)")// 需要权限的URL .antMatchers(included).access("@Authorization.hasPermission(request,authentication)")// 需要权限的URL
.and().cors() .and().cors()
@ -83,23 +82,19 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
token = CookieUtil.getCookieValue(request.getCookies(), "token"); token = CookieUtil.getCookieValue(request.getCookies(), "token");
} }
if (token == null) { // 组装Token ~ 这边根据实际的业务组装Token
LocalData.setToken(LocalData.getTempToken()); if (token != null){
} else {
// 组装Token ~ 这边根据实际的业务组装Token
TokensManager tokensManager = LocalData.getBean(TokensManager.class); TokensManager tokensManager = LocalData.getBean(TokensManager.class);
TokensBuildRequest tokensBuildRequest = new TokensBuildRequest(); TokensBuildRequest tokensBuildRequest = new TokensBuildRequest();
tokensBuildRequest.setToken(token); tokensBuildRequest.setToken(token);
TokensBuildResponse tokensBuildResponse = tokensManager.build(tokensBuildRequest, LocalData.getSysToken()); TokensBuildResponse tokensBuildResponse = tokensManager.build(tokensBuildRequest, LocalData.getSysToken());
if (tokensBuildResponse.hasError()) { if (!tokensBuildResponse.hasError()) {
LocalData.setToken(LocalData.getTempToken());
} else {
LocalData.setToken(tokensBuildResponse.getToken()); LocalData.setToken(tokensBuildResponse.getToken());
} }
} }
// Action // Action
String servletPath = request.getServletPath(); String servletPath = request.getServletPath().toLowerCase();
Pattern compile = Pattern.compile("^/(.+)\\.htm"); Pattern compile = Pattern.compile("^/(.+)\\.htm");
Matcher matcher = compile.matcher(servletPath); Matcher matcher = compile.matcher(servletPath);
if (matcher.find()) { if (matcher.find()) {
@ -117,7 +112,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// 授权 // 授权
Token token_ = LocalData.getToken(); Token token_ = LocalData.getToken();
if (token_.hasResource(request.getServletPath())) { if (token_ != null && token_.hasResource(request.getServletPath())) {
return true; return true;
} }

@ -4,7 +4,6 @@ import org.springframework.context.ApplicationContext;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.context.support.WebApplicationContextUtils;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -19,16 +18,12 @@ import javax.servlet.http.HttpServletResponse;
*/ */
public class LocalData { public class LocalData {
private static Token temp = null; private static ApplicationContext applicationContext = null;
private static Token system = null; private static Token system = null;
static { static {
// 组装临时Token和系统Token // 组装系统Token
temp = new Token();
temp.setId(-1);
temp.setUserId(-1);
temp.setUserName("临时");
system = new Token(); system = new Token();
system.setId(0); system.setId(0);
system.setUserId(0); system.setUserId(0);
@ -36,10 +31,6 @@ public class LocalData {
system.putResource(".*"); system.putResource(".*");
} }
public static Token getTempToken() {
return temp;
}
public static Token getSysToken() { public static Token getSysToken() {
return system; return system;
} }
@ -79,7 +70,11 @@ public class LocalData {
} }
public static ApplicationContext getApplicationContext() { public static ApplicationContext getApplicationContext() {
return WebApplicationContextUtils.getWebApplicationContext(getRequest().getServletContext()); return ${basePackage}.frame.auth.LocalData.applicationContext;
}
public static void setApplicationContext(ApplicationContext applicationContext) {
${basePackage}.frame.auth.LocalData.applicationContext = applicationContext;
} }
public static <T> T getBean(Class<T> t) { public static <T> T getBean(Class<T> t) {
@ -88,6 +83,6 @@ public class LocalData {
public static String getProp(String key) { public static String getProp(String key) {
Environment env = getBean(Environment.class); Environment env = getBean(Environment.class);
return env.getProperty(key,""); return env.getProperty(key, "");
} }
} }

@ -1,4 +1,4 @@
package xyz.wbsite.frame.schedule; package ${basePackage}.frame.schedule;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.scheduling.support.CronTrigger; import org.springframework.scheduling.support.CronTrigger;

@ -1,4 +1,4 @@
package xyz.wbsite.frame.schedule; package ${basePackage}.frame.schedule;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.util.Assert; import org.springframework.util.Assert;

@ -1,4 +1,4 @@
package xyz.wbsite.frame.schedule; package ${basePackage}.frame.schedule;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.util.Assert; import org.springframework.util.Assert;

@ -1,4 +1,4 @@
package xyz.wbsite.frame.schedule; package ${basePackage}.frame.schedule;
public abstract class RunSqlTask extends RunFixRepeatTask { public abstract class RunSqlTask extends RunFixRepeatTask {

@ -1,4 +1,4 @@
package xyz.wbsite.frame.schedule; package ${basePackage}.frame.schedule;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;

@ -6,12 +6,14 @@ import ${basePackage}.module.system.req.TokensCreateRequest;
import ${basePackage}.module.system.req.TokensDeleteRequest; import ${basePackage}.module.system.req.TokensDeleteRequest;
import ${basePackage}.module.system.req.TokensFindRequest; import ${basePackage}.module.system.req.TokensFindRequest;
import ${basePackage}.module.system.req.TokensGetRequest; import ${basePackage}.module.system.req.TokensGetRequest;
import ${basePackage}.module.system.req.TokensLogoutRequest;
import ${basePackage}.module.system.req.TokensUpdateRequest; import ${basePackage}.module.system.req.TokensUpdateRequest;
import ${basePackage}.module.system.rsp.TokensBuildResponse; import ${basePackage}.module.system.rsp.TokensBuildResponse;
import ${basePackage}.module.system.rsp.TokensCreateResponse; import ${basePackage}.module.system.rsp.TokensCreateResponse;
import ${basePackage}.module.system.rsp.TokensDeleteResponse; import ${basePackage}.module.system.rsp.TokensDeleteResponse;
import ${basePackage}.module.system.rsp.TokensFindResponse; import ${basePackage}.module.system.rsp.TokensFindResponse;
import ${basePackage}.module.system.rsp.TokensGetResponse; import ${basePackage}.module.system.rsp.TokensGetResponse;
import ${basePackage}.module.system.rsp.TokensLogoutResponse;
import ${basePackage}.module.system.rsp.TokensUpdateResponse; import ${basePackage}.module.system.rsp.TokensUpdateResponse;
/** /**
@ -76,4 +78,13 @@ public interface TokensManager {
* @return * @return
*/ */
TokensBuildResponse build(TokensBuildRequest request, Token token); TokensBuildResponse build(TokensBuildRequest request, Token token);
/**
* Token
*
* @param request
* @param token
* @return
*/
${basePackage}.module.system.rsp.TokensLogoutResponse logout(${basePackage}.module.system.req.TokensLogoutRequest request, Token token);
} }

@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil; import com.github.pagehelper.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -22,12 +23,14 @@ import ${basePackage}.module.system.req.TokensCreateRequest;
import ${basePackage}.module.system.req.TokensDeleteRequest; import ${basePackage}.module.system.req.TokensDeleteRequest;
import ${basePackage}.module.system.req.TokensFindRequest; import ${basePackage}.module.system.req.TokensFindRequest;
import ${basePackage}.module.system.req.TokensGetRequest; import ${basePackage}.module.system.req.TokensGetRequest;
import ${basePackage}.module.system.req.TokensLogoutRequest;
import ${basePackage}.module.system.req.TokensUpdateRequest; import ${basePackage}.module.system.req.TokensUpdateRequest;
import ${basePackage}.module.system.rsp.TokensBuildResponse; import ${basePackage}.module.system.rsp.TokensBuildResponse;
import ${basePackage}.module.system.rsp.TokensCreateResponse; import ${basePackage}.module.system.rsp.TokensCreateResponse;
import ${basePackage}.module.system.rsp.TokensDeleteResponse; import ${basePackage}.module.system.rsp.TokensDeleteResponse;
import ${basePackage}.module.system.rsp.TokensFindResponse; import ${basePackage}.module.system.rsp.TokensFindResponse;
import ${basePackage}.module.system.rsp.TokensGetResponse; import ${basePackage}.module.system.rsp.TokensGetResponse;
import ${basePackage}.module.system.rsp.TokensLogoutResponse;
import ${basePackage}.module.system.rsp.TokensUpdateResponse; import ${basePackage}.module.system.rsp.TokensUpdateResponse;
/** /**
@ -39,7 +42,7 @@ import ${basePackage}.module.system.rsp.TokensUpdateResponse;
*/ */
@Transactional @Transactional
@Service @Service
public class TokensManagerImpl implements TokensManager { public class TokensManagerImpl implements ${basePackage}.module.system.mgr.TokensManager {
@Value("${r'${web.url.auth.admin}'}") @Value("${r'${web.url.auth.admin}'}")
private String admin; private String admin;
@ -82,6 +85,7 @@ public class TokensManagerImpl implements TokensManager {
* @param token * @param token
* @return * @return
*/ */
@CacheEvict(value = CacheConfig.TOKEN_CACHE, key = "#request.token", condition = "!#result.hasError()")
public TokensDeleteResponse delete(TokensDeleteRequest request, Token token) { public TokensDeleteResponse delete(TokensDeleteRequest request, Token token) {
TokensDeleteResponse response = new TokensDeleteResponse(); TokensDeleteResponse response = new TokensDeleteResponse();
@ -107,6 +111,7 @@ public class TokensManagerImpl implements TokensManager {
* @param token * @param token
* @return * @return
*/ */
@CacheEvict(value = CacheConfig.TOKEN_CACHE, key = "#request.token", condition = "!#result.hasError()")
public TokensUpdateResponse update(TokensUpdateRequest request, Token token) { public TokensUpdateResponse update(TokensUpdateRequest request, Token token) {
TokensUpdateResponse response = new TokensUpdateResponse(); TokensUpdateResponse response = new TokensUpdateResponse();
@ -188,7 +193,7 @@ public class TokensManagerImpl implements TokensManager {
* @return * @return
*/ */
@Override @Override
@Cacheable(value = CacheConfig.TOKEN_CACHE, key = "#request.token") @Cacheable(value = CacheConfig.TOKEN_CACHE, key = "#request.token", unless = "#result.hasError()")
public TokensBuildResponse build(TokensBuildRequest request, Token token) { public TokensBuildResponse build(TokensBuildRequest request, Token token) {
TokensBuildResponse response = new TokensBuildResponse(); TokensBuildResponse response = new TokensBuildResponse();
@ -230,4 +235,35 @@ public class TokensManagerImpl implements TokensManager {
return response; return response;
} }
@Override
@CacheEvict(value = CacheConfig.TOKEN_CACHE, key = "#request.token", condition = "!#result.hasError()")
public TokensLogoutResponse logout(TokensLogoutRequest request, Token token) {
TokensLogoutResponse response = new TokensLogoutResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
TokensFindRequest tokensFindRequest = MapperUtil.map(request, TokensFindRequest.class);
tokensFindRequest.setValid(true);
TokensFindResponse tokensFindResponse = this.find(tokensFindRequest, token);
if (tokensFindResponse.hasError()) {
response.addErrors(tokensFindResponse.getErrors());
return response;
}
for (Tokens tokens : tokensFindResponse.getResult()) {
TokensUpdateRequest tokensUpdateRequest = MapperUtil.map(tokens, TokensUpdateRequest.class);
tokensUpdateRequest.setValid(false);
long result = tokensMapper.update(tokensUpdateRequest, token);
if (1L != result) {
response.addError(ErrorType.BUSINESS_ERROR, Message.UPDATE_FAILURE);
return response;
}
}
return response;
}
} }

@ -1,7 +1,8 @@
package ${basePackage}.module.system.req; package ${basePackage}.module.system.req;
import ${basePackage}.frame.base.BaseUpdateRequest; import ${basePackage}.frame.base.BaseUpdateRequest;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
/** /**
* TokensDeleteRequest - * TokensDeleteRequest -
@ -13,16 +14,16 @@ import javax.validation.constraints.NotNull;
public class TokensDeleteRequest extends BaseUpdateRequest { public class TokensDeleteRequest extends BaseUpdateRequest {
/** /**
* *
*/ */
@NotNull(message = "[id]主键不能为空") @NotBlank(message = "登录令牌不能为空")
private long id; private String token;
public long getId() { public String getToken() {
return this.id; return token;
} }
public void setId(long id) { public void setToken(String token) {
this.id = id; this.token = token;
} }
} }

@ -0,0 +1,29 @@
package ${basePackage}.module.system.req;
import ${basePackage}.frame.base.BaseFindRequest;
import javax.validation.constraints.NotBlank;
/**
* TokensLogoutRequest -
*
* @author wangbing
* @version 0.0.1
* @since 2017-01-01
*/
public class TokensLogoutRequest extends BaseFindRequest {
/**
*
*/
@NotBlank(message = "登录令牌不能为空")
private String token;
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
}

@ -0,0 +1,27 @@
package ${basePackage}.module.system.rsp;
import ${basePackage}.frame.base.BaseResponse;
import ${basePackage}.frame.base.Token;
/**
* TokensGetResponse -
*
* @author author
* @version 0.0.1
* @since 2017-01-01
*/
public class TokensLogoutResponse extends BaseResponse {
/**
*
*/
private Token token;
public Token getToken() {
return token;
}
public void setToken(Token token) {
this.token = token;
}
}

@ -63,7 +63,7 @@
} else { } else {
rsp.errors.push(handleError(error.response.status)); rsp.errors.push(handleError(error.response.status));
} }
return Promise.reject(rsp); return Promise.resolve(rsp);
}) })
} }
function upRequest(data) { function upRequest(data) {
@ -110,7 +110,7 @@
} else { } else {
rsp.errors.push(handleError(error.response.status)); rsp.errors.push(handleError(error.response.status));
} }
return Promise.reject(rsp); return Promise.resolve(rsp);
}) })
}; };
function downRequest(data) { function downRequest(data) {

@ -7,9 +7,17 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.module.system.mgr.TokensManager; import ${basePackage}.module.system.mgr.TokensManager;
import ${basePackage}.module.system.req.*; import ${basePackage}.module.system.req.TokensCreateRequest;
import ${basePackage}.module.system.rsp.*; import ${basePackage}.module.system.req.TokensFindRequest;
import ${basePackage}.module.system.req.TokensGetRequest;
import ${basePackage}.module.system.req.TokensUpdateRequest;
import ${basePackage}.module.system.rsp.TokensCreateResponse;
import ${basePackage}.module.system.rsp.TokensDeleteResponse;
import ${basePackage}.module.system.rsp.TokensFindResponse;
import ${basePackage}.module.system.rsp.TokensGetResponse;
import ${basePackage}.module.system.rsp.TokensUpdateResponse;
import java.util.Date; import java.util.Date;
@ -37,6 +45,7 @@ public class TokensTest {
@Test @Test
public void testCreate() { public void testCreate() {
TokensCreateRequest request = new TokensCreateRequest(); TokensCreateRequest request = new TokensCreateRequest();
request.setToken(IDgenerator.nextUUID());
request.setUserId(1L); request.setUserId(1L);
request.setUserName("用户名称"); request.setUserName("用户名称");
request.setLoginTime(new Date()); request.setLoginTime(new Date());
@ -49,7 +58,7 @@ public class TokensTest {
request.setTerminalIp("终端地址"); request.setTerminalIp("终端地址");
request.setTerminalInfo("终端信息"); request.setTerminalInfo("终端信息");
TokensCreateResponse response = tokensManager.create(request,token); TokensCreateResponse response = tokensManager.create(request, token);
assertTrue(!response.hasError()); assertTrue(!response.hasError());
} }
@ -59,6 +68,7 @@ public class TokensTest {
//创建数据 //创建数据
TokensCreateRequest createRequest = new TokensCreateRequest(); TokensCreateRequest createRequest = new TokensCreateRequest();
createRequest.setToken(IDgenerator.nextUUID());
createRequest.setUserId(1L); createRequest.setUserId(1L);
createRequest.setUserName("用户名称"); createRequest.setUserName("用户名称");
createRequest.setLoginTime(new Date()); createRequest.setLoginTime(new Date());
@ -71,14 +81,14 @@ public class TokensTest {
createRequest.setTerminalIp("终端地址"); createRequest.setTerminalIp("终端地址");
createRequest.setTerminalInfo("终端信息"); createRequest.setTerminalInfo("终端信息");
TokensCreateResponse createResponse = tokensManager.create(createRequest,token); TokensCreateResponse createResponse = tokensManager.create(createRequest, token);
assertTrue(!createResponse.hasError() && createResponse.getId() > 0); assertTrue(!createResponse.hasError() && createResponse.getId() > 0);
//删除数据 //删除数据
TokensDeleteRequest request = new TokensDeleteRequest(); ${basePackage}.module.system.req.TokensDeleteRequest request = new ${basePackage}.module.system.req.TokensDeleteRequest();
request.setId(createResponse.getId()); request.setToken(createRequest.getToken());
TokensDeleteResponse response = tokensManager.delete(request,token); TokensDeleteResponse response = tokensManager.delete(request, token);
assertTrue(!response.hasError() && response.getResult() == 1L); assertTrue(!response.hasError() && response.getResult() == 1L);
} }
@ -87,6 +97,7 @@ public class TokensTest {
public void testUpdate() { public void testUpdate() {
//创建数据 //创建数据
TokensCreateRequest createRequest = new TokensCreateRequest(); TokensCreateRequest createRequest = new TokensCreateRequest();
createRequest.setToken(IDgenerator.nextUUID());
createRequest.setUserId(1L); createRequest.setUserId(1L);
createRequest.setUserName("用户名称"); createRequest.setUserName("用户名称");
createRequest.setLoginTime(new Date()); createRequest.setLoginTime(new Date());
@ -118,7 +129,7 @@ public class TokensTest {
request.setTerminalIp("终端地址"); request.setTerminalIp("终端地址");
request.setTerminalInfo("终端信息"); request.setTerminalInfo("终端信息");
TokensUpdateResponse response = tokensManager.update(request,token); TokensUpdateResponse response = tokensManager.update(request, token);
assertTrue(!response.hasError() && response.getResult() == 1L); assertTrue(!response.hasError() && response.getResult() == 1L);
} }
@ -138,7 +149,7 @@ public class TokensTest {
request.setTerminalIp("终端地址"); request.setTerminalIp("终端地址");
request.setTerminalInfo("终端信息"); request.setTerminalInfo("终端信息");
TokensFindResponse response = tokensManager.find(request,token); TokensFindResponse response = tokensManager.find(request, token);
assertTrue(!response.hasError()); assertTrue(!response.hasError());
} }
@ -147,6 +158,7 @@ public class TokensTest {
public void testGet() { public void testGet() {
//创建数据 //创建数据
TokensCreateRequest createRequest = new TokensCreateRequest(); TokensCreateRequest createRequest = new TokensCreateRequest();
createRequest.setToken(IDgenerator.nextUUID());
createRequest.setUserId(1L); createRequest.setUserId(1L);
createRequest.setUserName("用户名称"); createRequest.setUserName("用户名称");
createRequest.setLoginTime(new Date()); createRequest.setLoginTime(new Date());
@ -167,7 +179,7 @@ public class TokensTest {
TokensGetRequest request = new TokensGetRequest(); TokensGetRequest request = new TokensGetRequest();
request.setId(createResponse.getId()); request.setId(createResponse.getId());
TokensGetResponse response = tokensManager.get(request,token); TokensGetResponse response = tokensManager.get(request, token);
assertTrue(!response.hasError() && response.getTokens() != null); assertTrue(!response.hasError() && response.getTokens() != null);
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.