• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java WebSSOProfileImpl类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.springframework.security.saml.websso.WebSSOProfileImpl的典型用法代码示例。如果您正苦于以下问题:Java WebSSOProfileImpl类的具体用法?Java WebSSOProfileImpl怎么用?Java WebSSOProfileImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

WebSSOProfileImpl类属于org.springframework.security.saml.websso包,在下文中一共展示了WebSSOProfileImpl类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: init

点赞 2

import org.springframework.security.saml.websso.WebSSOProfileImpl; //导入依赖的package包/类
@Override
public void init(HttpSecurity http) {

	metadataProvider = identityProvider.metadataProvider();
	ExtendedMetadata extendedMetadata = extendedMetadata(identityProvider.discoveryEnabled);
	extendedMetadataDelegate = extendedMetadataDelegate(extendedMetadata);
	serviceProvider.keyManager = serviceProvider.keyManager();
	cachingMetadataManager = cachingMetadataManager();
	webSSOProfile = new WebSSOProfileImpl(samlProcessor, cachingMetadataManager);
	samlAuthenticationProvider = samlAuthenticationProvider(webSSOProfileConsumer);

	bootstrap();

	SAMLContextProvider contextProvider = contextProvider();
	SAMLEntryPoint samlEntryPoint = samlEntryPoint(contextProvider);

	try {
		http
			.httpBasic()
			.authenticationEntryPoint(samlEntryPoint);

		CsrfConfigurer<HttpSecurity> csrfConfigurer = http.getConfigurer(CsrfConfigurer.class);
		if(csrfConfigurer != null) {
			// Workaround to get working with Spring Security 3.2.
			RequestMatcher ignored = new AntPathRequestMatcher("/saml/SSO");
			RequestMatcher notIgnored = new NegatedRequestMatcher(ignored);
			RequestMatcher matcher = new AndRequestMatcher(new DefaultRequiresCsrfMatcher(), notIgnored);

			csrfConfigurer.requireCsrfProtectionMatcher(matcher);
		}
	} catch (Exception e) {
		e.printStackTrace();
	}

	http
		.addFilterBefore(metadataGeneratorFilter(samlEntryPoint, extendedMetadata), ChannelProcessingFilter.class)
		.addFilterAfter(samlFilter(samlEntryPoint, contextProvider), BasicAuthenticationFilter.class)
		.authenticationProvider(samlAuthenticationProvider);
}
 

开发者ID:spring-projects,
项目名称:spring-security-saml-dsl,
代码行数:40,
代码来源:SAMLConfigurer.java

示例2: createDefaultWebSSOProfile

点赞 2

import org.springframework.security.saml.websso.WebSSOProfileImpl; //导入依赖的package包/类
@VisibleForTesting
protected WebSSOProfile createDefaultWebSSOProfile() {
    return new WebSSOProfileImpl();
}
 

开发者ID:ulisesbocchio,
项目名称:spring-boot-security-saml,
代码行数:5,
代码来源:WebSSOProfileConfigurer.java

示例3: webSSOprofile

点赞 2

import org.springframework.security.saml.websso.WebSSOProfileImpl; //导入依赖的package包/类
@Bean
public WebSSOProfile webSSOprofile() {
    return new WebSSOProfileImpl();
}
 

开发者ID:choonchernlim,
项目名称:spring-security-adfs-saml2,
代码行数:5,
代码来源:SAMLWebSecurityConfigurerAdapter.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)