當前位置: 首頁>>代碼示例>>Java>>正文


Java ClientDetailsServiceConfigurer.jdbc方法代碼示例

本文整理匯總了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);
}
 
開發者ID:jeesun,項目名稱:spring-boot-oauth2-server,代碼行數:17,代碼來源:AuthServerOAuth2Config.java

示例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
	}
 
開發者ID:bojanb89pa,項目名稱:OAuth2Spring,代碼行數:30,代碼來源:OAuth2Configuration.java

示例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);
}
 
開發者ID:AgainstWind,項目名稱:spring-cloud-demos,代碼行數:6,代碼來源:TestAuthorizationConfig.java

示例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);
            */
}
 
開發者ID:atereshkov,項目名稱:Diber-backend,代碼行數:14,代碼來源:AuthorizationServerConfiguration.java

示例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
    }
 
開發者ID:bndynet,項目名稱:web-framework-for-java,代碼行數:13,代碼來源:OAuth2Config.java

示例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);
}
 
開發者ID:aksappy,項目名稱:RestSecurityOAuth,代碼行數:11,代碼來源:OAuth2ServerConfiguration.java

示例7: configure

import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
	
	clients
		.jdbc(securityDataSource)
		;
}
 
開發者ID:ishaigor,項目名稱:rest-retro-sample,代碼行數:8,代碼來源:OAuth2AuthorizationServerConfigurer.java

示例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()));
    }
}
 
開發者ID:chocotan,項目名稱:lolibox,代碼行數:16,代碼來源:AuthorizationServerConfiguration.java

示例9: configure

import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
    clients.jdbc(appConfig.dataSource());
}
 
開發者ID:dazito,項目名稱:oauth2-with-jdbc,代碼行數:5,代碼來源:AuthServerOAuth2Config.java

示例10: configure

import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
public void configure(ClientDetailsServiceConfigurer clients)
        throws Exception {
    clients.jdbc(dataSource);
}
 
開發者ID:PacktPublishing,項目名稱:OAuth-2.0-Cookbook,代碼行數:5,代碼來源:OAuth2AuthorizationServer.java

示例11: configure

import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients)
        throws Exception {
    clients.jdbc(dataSource);
}
 
開發者ID:PacktPublishing,項目名稱:OAuth-2.0-Cookbook,代碼行數:6,代碼來源:OAuth2AuthorizationServer.java

示例12: configure

import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
    clients.jdbc(dataSource);
}
 
開發者ID:PacktPublishing,項目名稱:OAuth-2.0-Cookbook,代碼行數:5,代碼來源:AuthorizationServerConfiguration.java

示例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);
}
 
開發者ID:imrenagi,項目名稱:microservice-skeleton,代碼行數:5,代碼來源:JdbcOAuth2Config.java

示例15: configure

import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; //導入方法依賴的package包/類
@Override
public void configure(ClientDetailsServiceConfigurer clientDetailsServiceConfigurer) throws Exception {
    clientDetailsServiceConfigurer
            .jdbc(dataSource);
}
 
開發者ID:RizkiMufrizal,項目名稱:Spring-OAuth2-Custom,代碼行數:6,代碼來源:OAuth2Configuration.java


注:本文中的org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer.jdbc方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。