Java Code Examples for org.springframework.security.saml.websso.SingleLogoutProfile

The following examples show how to use org.springframework.security.saml.websso.SingleLogoutProfile. These examples are extracted from open source projects. 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
@Override
public void configure(ServiceProviderBuilder builder) throws Exception {
    if (sloProfileBean == null) {
        if (sloProfile == null) {
            sloProfile = createDefaultSingleLogoutProfile();
        }
        builder.setSharedObject(SingleLogoutProfile.class, sloProfile);
    }
}
 
Example 2
@Test
public void configure() throws Exception {
    SingleLogoutProfileConfigurer configurer = spy(new SingleLogoutProfileConfigurer());
    SingleLogoutProfile profile = mock(SingleLogoutProfile.class);
    when(configurer.createDefaultSingleLogoutProfile()).thenReturn(profile);
    configurer.init(builder);
    configurer.configure(builder);
    verify(builder).setSharedObject(eq(SingleLogoutProfile.class), eq(profile));
}
 
Example 3
@Test
public void configure_forBean() throws Exception {
    SingleLogoutProfileConfigurer configurer = spy(new SingleLogoutProfileConfigurer());
    SingleLogoutProfile profile = mock(SingleLogoutProfile.class);
    when(builder.getSharedObject(SingleLogoutProfile.class)).thenReturn(profile);
    configurer.init(builder);
    configurer.configure(builder);
    verify(configurer, never()).createDefaultSingleLogoutProfile();
    verify(builder, never()).setSharedObject(any(), any());
    verifyZeroInteractions(profile);
}
 
Example 4
@Test
public void configure_forConstructor() throws Exception {
    SingleLogoutProfile profile = mock(SingleLogoutProfile.class);
    SingleLogoutProfileConfigurer configurer = spy(new SingleLogoutProfileConfigurer(profile));
    configurer.init(builder);
    configurer.configure(builder);
    verify(configurer, never()).createDefaultSingleLogoutProfile();
    verify(builder).setSharedObject(SingleLogoutProfile.class, profile);
    verifyZeroInteractions(profile);
}
 
Example 5
Source Project: blackduck-alert   Source File: SamlConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public SingleLogoutProfile logoutProfile() {
    return new SingleLogoutProfileImpl();
}
 
Example 6
/**
 * Set up logout profile for SAML
 * 
 * @return
 */
@Bean
@Conditional(InsightsSAMLBeanInitializationCondition.class)
public SingleLogoutProfile logoutProfile() {
	return new SingleLogoutProfileImpl();
}
 
Example 7
public SingleLogoutProfileConfigurer(SingleLogoutProfile sloProfile) {
    this.sloProfile = sloProfile;
}
 
Example 8
@Override
public void init(ServiceProviderBuilder builder) throws Exception {
    sloProfileBean = builder.getSharedObject(SingleLogoutProfile.class);
}
 
Example 9
@VisibleForTesting
protected SingleLogoutProfile createDefaultSingleLogoutProfile() {
    return new SingleLogoutProfileImpl();
}
 
Example 10
@Test
public void init() throws Exception {
    SingleLogoutProfileConfigurer configurer = new SingleLogoutProfileConfigurer();
    configurer.init(builder);
    verify(builder).getSharedObject(eq(SingleLogoutProfile.class));
}
 
Example 11
@Bean
public SingleLogoutProfile logoutprofile() {
    return new SingleLogoutProfileImpl();
}