本文整理匯總了Java中org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer.jdbc方法的典型用法代碼示例。如果您正苦於以下問題:Java ClientDetailsServiceConfigurer.jdbc方法的具體用法?Java ClientDetailsServiceConfigurer.jdbc怎麽用?Java ClientDetailsServiceConfigurer.jdbc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer
的用法示例。
在下文中一共展示了ClientDetailsServiceConfigurer.jdbc方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients)
throws Exception {
/*clients.jdbc(dataSource)
.withClient("sampleClientId")
.authorizedGrantTypes("implicit")
.scopes("read")
.autoApprove(true)
.and()
.withClient("clientIdPassword")
.secret("secret")
.authorizedGrantTypes(
"password","authorization_code", "refresh_token")
.scopes("read");*/
clients.jdbc(dataSource);
}
示例2: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
// @formatter:off
clients.jdbc(dataSource);
//add this to init client:
// .passwordEncoder(passwordEncoder);
// .withClient("test_client")
// .authorizedGrantTypes("password", "refresh_token")
// .scopes("read", "write", "trust");
// .passwordEncoder(passwordEncoder)
// .withClient("my-trusted-client")
// .authorizedGrantTypes("password", "authorization_code",
// "refresh_token", "implicit")
// .authorities("ROLE_CLIENT", "ROLE_TRUSTED_CLIENT")
// .scopes("read", "write", "trust")
// .resourceIds("oauth2-resource")
// .accessTokenValiditySeconds(60).and()
// .withClient("my-client-with-registered-redirect")
// .authorizedGrantTypes("authorization_code")
// .authorities("ROLE_CLIENT").scopes("read", "trust")
// .resourceIds("oauth2-resource")
// .redirectUris("http://anywhere?key=value").and()
// .withClient("my-client-with-secret")
// .authorizedGrantTypes("client_credentials", "password")
// .authorities("ROLE_CLIENT").scopes("read")
// .resourceIds("oauth2-resource").secret("secret");
// @formatter:on
}
示例3: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
DataSource dataSource = context.getBean(DataSource.class);
clients.jdbc(dataSource);
}
示例4: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
clients
.jdbc(dataSource);
/*
.withClient(CLIENT) // uncomment this if we want to create new client with name and secret
.authorizedGrantTypes(GRANT_TYPE_PASSWORD, GRANT_TYPE_REFRESH_TOKEN)
.authorities(AUTHORITY_USER)
.scopes(SCOPE_READ, SCOPE_WRITE)
.resourceIds(RESOURCE_ID)
.secret(SECRET);
*/
}
示例5: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
// Memory Example
// clients.inMemory()
// .withClient("client_id")
// .secret("client_secret")
// .authorizedGrantTypes("implicit", "client_credentials", "password", "authorization_code", "refresh_token")
// .scopes("read", "write")
// .authorizedGrantTypes("password","authorization_code", "refresh_token");
clients.jdbc(dataSource); // require table named oauth_client_details
}
示例6: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
// @formatter:off
// clients.inMemory().withClient("clientapp").authorizedGrantTypes("password",
// "refresh_token")
// .authorities("USER").scopes("read",
// "write").resourceIds(RESOURCE_ID).secret("123456");
// @formatter:on
clients.jdbc(dataSource);
}
示例7: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
clients
.jdbc(securityDataSource)
;
}
示例8: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
// TODO Add JPA Builder
JdbcClientDetailsServiceBuilder builder = clients
.jdbc(ds);
if (this.clients != null) {
FinalValueHolder<ClientDetailsServiceBuilder> detailHolder = new FinalValueHolder<>(builder);
this.clients.forEach(c -> detailHolder.setValue(detailHolder.getValue().withClient(c.getName()).secret(c.getSecret())
.authorizedGrantTypes("password")
.authorities("ROLE_CLIENT")
.scopes("read", "write")
.resourceIds("oauth2-resource")
.accessTokenValiditySeconds(Integer.MAX_VALUE).and()));
}
}
示例9: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
clients.jdbc(appConfig.dataSource());
}
示例10: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
public void configure(ClientDetailsServiceConfigurer clients)
throws Exception {
clients.jdbc(dataSource);
}
示例11: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients)
throws Exception {
clients.jdbc(dataSource);
}
示例12: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
clients.jdbc(dataSource);
}
示例13: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(final ClientDetailsServiceConfigurer clients) throws Exception {
clients.jdbc(this.dataSource);
}
開發者ID:PacktPublishing,項目名稱:Building-Web-Apps-with-Spring-5-and-Angular,代碼行數:5,代碼來源:AuthServerOAuth2Config.java
示例14: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(final ClientDetailsServiceConfigurer clients) throws Exception {
clients.jdbc(dataSource);
}
示例15: configure
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clientDetailsServiceConfigurer) throws Exception {
clientDetailsServiceConfigurer
.jdbc(dataSource);
}