[英]Oauth2 authentication
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
clients.inMemory()
.withClient("javadeveloperzone")
.secret("secretcode")
.accessTokenValiditySeconds(2000) // expire time for access token
.refreshTokenValiditySeconds(-1) // expire time for refresh token
.scopes("read", "write") // scope related to resource server
.authorizedGrantTypes("password", "refresh_token");
}
I use this code but I want to accessTokenValiditySeconds read from my data base please help me for that i new in Spring web service authentication. 我使用此代码,但我想访问从数据库读取的tokenTokenValiditySeconds,请为我在Spring Web Service身份验证中的新增功能提供帮助。 Thanks in advance.
提前致谢。
You can @Autowired a service/dao and make a request to read value from database. 您可以@Autowired服务/ dao并请求从数据库中读取值。 What's your problem ?
你怎么了 ?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.