Java Code Examples for org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider#setUserDetailsService()

The following examples show how to use org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider#setUserDetailsService() . 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: WebSecurityConfig.java    From Hacktoberfest2019 with Apache License 2.0 5 votes vote down vote up
@Bean
public KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider() {
    KerberosServiceAuthenticationProvider provider = new KerberosServiceAuthenticationProvider();
    provider.setTicketValidator(sunJaasKerberosTicketValidator());
    provider.setUserDetailsService(dummyUserDetailsService());
    return provider;
}
 
Example 2
Source File: KerberosServiceFactoryBean.java    From localization_nifi with Apache License 2.0 5 votes vote down vote up
private KerberosServiceAuthenticationProvider createKerberosServiceAuthenticationProvider() throws Exception {
    KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider = new KerberosServiceAuthenticationProvider();
    kerberosServiceAuthenticationProvider.setTicketValidator(createTicketValidator());
    kerberosServiceAuthenticationProvider.setUserDetailsService(createAlternateKerberosUserDetailsService());
    kerberosServiceAuthenticationProvider.afterPropertiesSet();
    return kerberosServiceAuthenticationProvider;
}
 
Example 3
Source File: InsightsSecurityConfigurationAdapterKerberos.java    From Insights with Apache License 2.0 5 votes vote down vote up
/**
 * used to set kerberos Service Authentication Provider
 * 
 * @return
 */
@Bean
@Conditional(InsightsKerberosBeanInitializationCondition.class)
public KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider() {
	KerberosServiceAuthenticationProvider provider = new KerberosServiceAuthenticationProvider();
	provider.setTicketValidator(sunJaasKerberosTicketValidator());
	provider.setUserDetailsService(kerberosUserDetailsService());
	return provider;
}
 
Example 4
Source File: KerberosServiceFactoryBean.java    From nifi with Apache License 2.0 5 votes vote down vote up
private KerberosServiceAuthenticationProvider createKerberosServiceAuthenticationProvider() throws Exception {
    KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider = new KerberosServiceAuthenticationProvider();
    kerberosServiceAuthenticationProvider.setTicketValidator(createTicketValidator());
    kerberosServiceAuthenticationProvider.setUserDetailsService(createAlternateKerberosUserDetailsService());
    kerberosServiceAuthenticationProvider.afterPropertiesSet();
    return kerberosServiceAuthenticationProvider;
}
 
Example 5
Source File: WebSecurityConfig.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider() {
    KerberosServiceAuthenticationProvider provider = new KerberosServiceAuthenticationProvider();
    provider.setTicketValidator(sunJaasKerberosTicketValidator());
    provider.setUserDetailsService(dummyUserDetailsService());
    return provider;
}
 
Example 6
Source File: WebSecurityConfig.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider() {
	KerberosServiceAuthenticationProvider provider = new KerberosServiceAuthenticationProvider();
	provider.setTicketValidator(sunJaasKerberosTicketValidator());
	provider.setUserDetailsService(dummyUserDetailsService());
	return provider;
}
 
Example 7
Source File: KerberosSpnegoFactory.java    From nifi-registry with Apache License 2.0 3 votes vote down vote up
private KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider() throws Exception {

        if (kerberosServiceAuthenticationProvider == null && properties.isKerberosSpnegoSupportEnabled()) {

            KerberosServiceAuthenticationProvider ksap = new KerberosServiceAuthenticationProvider();
            ksap.setTicketValidator(kerberosTicketValidator);
            ksap.setUserDetailsService(new KerberosUserDetailsService());
            ksap.afterPropertiesSet();

            kerberosServiceAuthenticationProvider = ksap;

        }

        return kerberosServiceAuthenticationProvider;
    }