[英]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");
}
我使用此代碼,但我想訪問從數據庫讀取的tokenTokenValiditySeconds,請為我在Spring Web Service身份驗證中的新增功能提供幫助。 提前致謝。
您可以@Autowired服務/ dao並請求從數據庫中讀取值。 你怎么了 ?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.