当前位置: 首页>>代码示例>>Java>>正文


Java OAuth2ClientAuthenticationProcessingFilter.setApplicationEventPublisher方法代码示例

本文整理汇总了Java中org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter.setApplicationEventPublisher方法的典型用法代码示例。如果您正苦于以下问题:Java OAuth2ClientAuthenticationProcessingFilter.setApplicationEventPublisher方法的具体用法?Java OAuth2ClientAuthenticationProcessingFilter.setApplicationEventPublisher怎么用?Java OAuth2ClientAuthenticationProcessingFilter.setApplicationEventPublisher使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter的用法示例。


在下文中一共展示了OAuth2ClientAuthenticationProcessingFilter.setApplicationEventPublisher方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: oauth2SsoFilter

import org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter; //导入方法依赖的package包/类
private OAuth2ClientAuthenticationProcessingFilter oauth2SsoFilter(
		OAuth2SsoProperties sso) {
	OAuth2RestOperations restTemplate = this.applicationContext
			.getBean(UserInfoRestTemplateFactory.class).getUserInfoRestTemplate();
	ResourceServerTokenServices tokenServices = this.applicationContext
			.getBean(ResourceServerTokenServices.class);
	OAuth2ClientAuthenticationProcessingFilter filter = new OAuth2ClientAuthenticationProcessingFilter(
			sso.getLoginPath());
	filter.setRestTemplate(restTemplate);
	filter.setTokenServices(tokenServices);
	filter.setApplicationEventPublisher(this.applicationContext);
	return filter;
}
 
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:14,代码来源:SsoSecurityConfigurer.java

示例2: ssoFilter

import org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter; //导入方法依赖的package包/类
private OAuth2ClientAuthenticationProcessingFilter ssoFilter(String provideName,
                                                             ClientResources clientResources) {
    OAuth2ClientAuthenticationProcessingFilter filter =
            new OAuth2ClientAuthenticationProcessingFilter(format("/login/%s", provideName));
    filter.setRestTemplate(new OAuth2RestTemplate(clientResources.getClient(), oauth2ClientContext));
    filter.setTokenServices(new UserInfoTokenServices(clientResources.getResource().getUserInfoUri(),
            clientResources.getClient().getClientId()));
    filter.setApplicationEventPublisher(applicationEventPublisher);
    return filter;
}
 
开发者ID:restbucks,项目名称:restbucks-member,代码行数:11,代码来源:WebSecurityConfiguration.java

示例3: ssoFilter

import org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter; //导入方法依赖的package包/类
private Filter ssoFilter(ClientResources client, String path, String provider) {
    OAuth2ClientAuthenticationProcessingFilter oAuth2ClientAuthenticationFilter = new OAuth2ClientAuthenticationProcessingFilter(
            path);
    OAuth2RestTemplate oAuth2RestTemplate = new OAuth2RestTemplate(client.getClient(), oauth2ClientContext);
    oAuth2ClientAuthenticationFilter.setRestTemplate(oAuth2RestTemplate);
    CustomTokenService tokenServices = new CustomTokenService(client.getResource().getUserInfoUri(),
            client.getClient().getClientId(), provider);
    tokenServices.setRestTemplate(oAuth2RestTemplate);
    oAuth2ClientAuthenticationFilter.setTokenServices(tokenServices);
    oAuth2ClientAuthenticationFilter.setApplicationEventPublisher(applicationEventPublisher);
    return oAuth2ClientAuthenticationFilter;
}
 
开发者ID:mslosarz,项目名称:nextrtc-videochat-with-rest,代码行数:13,代码来源:WebSecurityConfig.java


注:本文中的org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter.setApplicationEventPublisher方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。