Commit 2a1ac326 by yuwei

项目初始化

parent ba14650a
...@@ -108,10 +108,10 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap ...@@ -108,10 +108,10 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap
tokenServices.setSupportRefreshToken(true); tokenServices.setSupportRefreshToken(true);
tokenServices.setClientDetailsService(clientDetails()); tokenServices.setClientDetailsService(clientDetails());
tokenServices.setTokenEnhancer(tokenEnhancer()); tokenServices.setTokenEnhancer(tokenEnhancer());
// token有效期自定义设置,默认12小时 // // token有效期自定义设置,默认12小时 设置为24小时86400
tokenServices.setAccessTokenValiditySeconds(60 * 60 * 24 * 1); // tokenServices.setAccessTokenValiditySeconds(60 * 60 * 24 * 1);
// refresh_token默认30天 // // refresh_token默认30天 设置为7天604800
tokenServices.setRefreshTokenValiditySeconds(60 * 60 * 24 * 7); // tokenServices.setRefreshTokenValiditySeconds(60 * 60 * 24 * 7);
return tokenServices; return tokenServices;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment