Java Code Examples for org.springframework.security.cas.ServiceProperties

The following examples show how to use org.springframework.security.cas.ServiceProperties. 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
Source Project: cymbal   Source File: CasConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
@Bean
public CasAuthenticationEntryPoint casAuthenticationEntryPoint(ServiceProperties serviceProperties) {
    CasAuthenticationEntryPoint entryPoint = new CasAuthenticationEntryPoint();
    entryPoint.setLoginUrl(this.casProperties.getServerLoginUrl());
    entryPoint.setServiceProperties(serviceProperties);
    return entryPoint;
}
 
Example 2
Source Project: cymbal   Source File: CasConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
@Bean
public CasAuthenticationProvider casAuthenticationProvider(CasUserDetailService casUserDetailService,
        ServiceProperties serviceProperties, Cas20ServiceTicketValidator ticketValidator) {
    CasAuthenticationProvider provider = new CasAuthenticationProvider();
    provider.setKey("casProvider");
    provider.setServiceProperties(serviceProperties);
    provider.setTicketValidator(ticketValidator);
    provider.setAuthenticationUserDetailsService(casUserDetailService);
    return provider;
}
 
Example 3
Source Project: cymbal   Source File: SecurityConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
@Bean
public CasAuthenticationProvider casAuthenticationProvider(final CasUserDetailService casUserDetailService,
        final ServiceProperties serviceProperties, final Cas20ServiceTicketValidator ticketValidator) {
    CasAuthenticationProvider provider = new CasAuthenticationProvider();
    provider.setKey("casProvider");
    provider.setServiceProperties(serviceProperties);
    provider.setTicketValidator(ticketValidator);
    provider.setAuthenticationUserDetailsService(casUserDetailService);
    return provider;
}
 
Example 4
Source Project: cymbal   Source File: SecurityConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
@Bean
public CasAuthenticationEntryPoint casAuthenticationEntryPoint(final ServiceProperties serviceProperties) {
    CasAuthenticationEntryPoint entryPoint = new CasAuthenticationEntryPoint();
    entryPoint.setLoginUrl(this.casProperties.getServerLoginUrl());
    entryPoint.setServiceProperties(serviceProperties);
    return entryPoint;
}
 
Example 5
Source Project: Spring-Security-Third-Edition   Source File: CasConfig.java    License: MIT License 5 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
        setAuthenticateAllArtifacts(true);
    }};
}
 
Example 6
Source Project: Spring-Security-Third-Edition   Source File: CasConfig.java    License: MIT License 5 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
        setAuthenticateAllArtifacts(true);
    }};
}
 
Example 7
Source Project: Spring-Security-Third-Edition   Source File: CasConfig.java    License: MIT License 5 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
        setAuthenticateAllArtifacts(true);
    }};
}
 
Example 8
Source Project: onetwo   Source File: CasSsoContextConfig.java    License: Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean(ServiceProperties.class)
public ServiceProperties serviceProperties(){
	ServiceProperties serviceProps = new ServiceProperties();
	serviceProps.setService(bootSecurityConfig.getCas().getService());
	serviceProps.setSendRenew(bootSecurityConfig.getCas().isSendRenew());
	return serviceProps;
}
 
Example 9
@Bean
public ServiceProperties serviceProperties() {
	ServiceProperties sp = new ServiceProperties();
	sp.setService(env.getRequiredProperty(CAS_SERVICE_URL));
	sp.setSendRenew(false);
	return sp;
}
 
Example 10
Source Project: tutorials   Source File: CasSecuredApplication.java    License: MIT License 5 votes vote down vote up
@Bean
public CasAuthenticationFilter casAuthenticationFilter(
  AuthenticationManager authenticationManager,
  ServiceProperties serviceProperties) throws Exception {
    CasAuthenticationFilter filter = new CasAuthenticationFilter();
    filter.setAuthenticationManager(authenticationManager);
    filter.setServiceProperties(serviceProperties);
    return filter;
}
 
Example 11
Source Project: tutorials   Source File: CasSecuredApplication.java    License: MIT License 5 votes vote down vote up
@Bean
public CasAuthenticationProvider casAuthenticationProvider(
  TicketValidator ticketValidator,
  ServiceProperties serviceProperties) {
    CasAuthenticationProvider provider = new CasAuthenticationProvider();
    provider.setServiceProperties(serviceProperties);
    provider.setTicketValidator(ticketValidator);
    provider.setUserDetailsService(
      s -> new User("[email protected]", "Mellon", true, true, true, true,
      AuthorityUtils.createAuthorityList("ROLE_ADMIN")));
    provider.setKey("CAS_PROVIDER_LOCALHOST_8900");
    return provider;
}
 
Example 12
Source Project: tutorials   Source File: WebSecurityConfig.java    License: MIT License 5 votes vote down vote up
@Autowired
public WebSecurityConfig(SingleSignOutFilter singleSignOutFilter, LogoutFilter logoutFilter,
                         CasAuthenticationProvider casAuthenticationProvider,
                         ServiceProperties serviceProperties) {
    this.logoutFilter = logoutFilter;
    this.singleSignOutFilter = singleSignOutFilter;
    this.serviceProperties = serviceProperties;
    this.casAuthenticationProvider = casAuthenticationProvider;
}
 
Example 13
Source Project: we-cmdb   Source File: SpringWebConfig.java    License: Apache License 2.0 4 votes vote down vote up
private ServiceProperties serviceProperties() {
    ServiceProperties properties = new ServiceProperties();
    properties.setService(getServerUrl() + "/login/cas");
    properties.setSendRenew(false);
    return properties;
}
 
Example 14
Source Project: dubbo-postman   Source File: WebSecurityConfig.java    License: MIT License 4 votes vote down vote up
private ServiceProperties serviceProperties() {
    ServiceProperties properties = new ServiceProperties();
    properties.setService(SERVICE_HOME+"/cas_security_check");
    properties.setSendRenew(false);
    return properties;
}
 
Example 15
Source Project: Spring-Security-Third-Edition   Source File: CasConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
    }};
}
 
Example 16
Source Project: Spring-Security-Third-Edition   Source File: CasConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
    }};
}
 
Example 17
Source Project: Spring-Security-Third-Edition   Source File: CasConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
    }};
}
 
Example 18
Source Project: nextreports-server   Source File: CasUtil.java    License: Apache License 2.0 4 votes vote down vote up
public static ServiceProperties getServiceProperties() {
	return (ServiceProperties) getSpringBean("serviceProperties");
}