org.springframework.security.saml.websso.WebSSOProfileConsumer Java Examples
The following examples show how to use
org.springframework.security.saml.websso.WebSSOProfileConsumer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InsightsSecurityConfigurationAdapterSAML.java From Insights with Apache License 2.0 | 5 votes |
/** * SAML 2.0 WebSSO Assertion Consumer * * @return */ @Bean @Conditional(InsightsSAMLBeanInitializationCondition.class) public WebSSOProfileConsumer webSSOprofileConsumer() { WebSSOProfileConsumerImpl webSSOProfileConsumerImpl = new WebSSOProfileConsumerImpl(); webSSOProfileConsumerImpl.setResponseSkew(600); webSSOProfileConsumerImpl.setMaxAuthenticationAge(36000); return webSSOProfileConsumerImpl; }
Example #2
Source File: WebSSOProfileConsumerConfigurer.java From spring-boot-security-saml with MIT License | 5 votes |
@Override public void configure(ServiceProviderBuilder builder) throws Exception { if (webSSOProfileConsumerBean == null) { if (webSSOProfileConsumer == null) { webSSOProfileConsumer = createWebSSOProfileConsumer(); } builder.setSharedObject(WebSSOProfileConsumer.class, webSSOProfileConsumer); } }
Example #3
Source File: DSLSAMLAuthenticationProvider.java From spring-boot-security-saml with MIT License | 5 votes |
/** * Profile for consumption of processed messages, must be set. * * @param consumer consumer */ @Override @Autowired(required = false) @Qualifier("webSSOprofileConsumer") public void setConsumer(WebSSOProfileConsumer consumer) { Assert.notNull(consumer, "WebSSO Profile Consumer can't be null"); this.consumer = consumer; }
Example #4
Source File: DSLSAMLAuthenticationProvider.java From spring-boot-security-saml with MIT License | 5 votes |
/** * Profile for consumption of processed messages using the Holder-of-Key profile, must be set. * * @param hokConsumer holder-of-key consumer */ @Override @Autowired(required = false) @Qualifier("hokWebSSOprofileConsumer") public void setHokConsumer(WebSSOProfileConsumer hokConsumer) { this.hokConsumer = hokConsumer; }
Example #5
Source File: WebSSOProfileConsumerConfigurerTest.java From spring-boot-security-saml with MIT License | 5 votes |
@Test public void configure() throws Exception { WebSSOProfileConsumerConfigurer configurer = spy(new WebSSOProfileConsumerConfigurer()); WebSSOProfileConsumer profile = mock(WebSSOProfileConsumer.class); when(configurer.createWebSSOProfileConsumer()).thenReturn(profile); configurer.init(builder); configurer.configure(builder); verify(builder).setSharedObject(eq(WebSSOProfileConsumer.class), eq(profile)); }
Example #6
Source File: WebSSOProfileConsumerConfigurerTest.java From spring-boot-security-saml with MIT License | 5 votes |
@Test public void configure_forBean() throws Exception { WebSSOProfileConsumerConfigurer configurer = spy(new WebSSOProfileConsumerConfigurer()); WebSSOProfileConsumer profile = mock(WebSSOProfileConsumer.class); when(builder.getSharedObject(WebSSOProfileConsumer.class)).thenReturn(profile); configurer.init(builder); configurer.configure(builder); verify(configurer, never()).createWebSSOProfileConsumer(); verify(builder, never()).setSharedObject(any(), any()); verifyZeroInteractions(profile); }
Example #7
Source File: WebSSOProfileConsumerConfigurerTest.java From spring-boot-security-saml with MIT License | 5 votes |
@Test public void configure_forConstructor() throws Exception { WebSSOProfileConsumer profile = mock(WebSSOProfileConsumer.class); WebSSOProfileConsumerConfigurer configurer = spy(new WebSSOProfileConsumerConfigurer(profile)); configurer.init(builder); configurer.configure(builder); verify(configurer, never()).createWebSSOProfileConsumer(); verify(builder).setSharedObject(WebSSOProfileConsumer.class, profile); verifyZeroInteractions(profile); }
Example #8
Source File: SamlConfig.java From blackduck-alert with Apache License 2.0 | 4 votes |
@Bean public WebSSOProfileConsumer webSSOprofileConsumer() { // If the machine running Alert has a different time than the SSO system the maximum difference allowed by default is 60 seconds // setResponseSkew(...) to change the skew time if needed return new WebSSOProfileConsumerImpl(); }
Example #9
Source File: WebSSOProfileConsumerConfigurer.java From spring-boot-security-saml with MIT License | 4 votes |
public WebSSOProfileConsumerConfigurer(WebSSOProfileConsumer webSSOProfileConsumer) { this.webSSOProfileConsumer = webSSOProfileConsumer; }
Example #10
Source File: WebSSOProfileConsumerConfigurer.java From spring-boot-security-saml with MIT License | 4 votes |
@Override public void init(ServiceProviderBuilder builder) throws Exception { webSSOProfileConsumerBean = builder.getSharedObject(WebSSOProfileConsumer.class); }
Example #11
Source File: WebSSOProfileConsumerConfigurer.java From spring-boot-security-saml with MIT License | 4 votes |
protected WebSSOProfileConsumer createWebSSOProfileConsumer() { return new WebSSOProfileConsumerImpl(); }
Example #12
Source File: WebSSOProfileConsumerConfigurerTest.java From spring-boot-security-saml with MIT License | 4 votes |
@Test public void init() throws Exception { WebSSOProfileConsumerConfigurer configurer = new WebSSOProfileConsumerConfigurer(); configurer.init(builder); verify(builder).getSharedObject(eq(WebSSOProfileConsumer.class)); }
Example #13
Source File: WebSecurityConfig.java From spring-boot-security-saml-sample with Apache License 2.0 | 4 votes |
@Bean public WebSSOProfileConsumer webSSOprofileConsumer() { return new WebSSOProfileConsumerImpl(); }