org.springframework.security.cas.ServiceProperties Java Examples

The following examples show how to use org.springframework.security.cas.ServiceProperties. 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: CasConfiguration.java    From cymbal with 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 File: CasConfiguration.java    From cymbal with 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 File: SecurityConfiguration.java    From cymbal with 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 File: SecurityConfiguration.java    From cymbal with 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 File: WebSecurityConfig.java    From tutorials with 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 #6
Source File: CasSecuredApplication.java    From tutorials with 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 #7
Source File: CasConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
        setAuthenticateAllArtifacts(true);
    }};
}
 
Example #8
Source File: CasConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
        setAuthenticateAllArtifacts(true);
    }};
}
 
Example #9
Source File: CasConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
        setAuthenticateAllArtifacts(true);
    }};
}
 
Example #10
Source File: CasSecuredApplication.java    From tutorials with 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 File: CasSsoContextConfig.java    From onetwo with 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 #12
Source File: SecurityConfiguration.java    From demo-spring-security-cas with Apache License 2.0 5 votes vote down vote up
@Bean
public ServiceProperties serviceProperties() {
	ServiceProperties sp = new ServiceProperties();
	sp.setService(env.getRequiredProperty(CAS_SERVICE_URL));
	sp.setSendRenew(false);
	return sp;
}
 
Example #13
Source File: CasUtil.java    From nextreports-server with Apache License 2.0 4 votes vote down vote up
public static ServiceProperties getServiceProperties() {
	return (ServiceProperties) getSpringBean("serviceProperties");
}
 
Example #14
Source File: SpringWebConfig.java    From we-cmdb with 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 #15
Source File: CasConfig.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
    }};
}
 
Example #16
Source File: CasConfig.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
    }};
}
 
Example #17
Source File: CasConfig.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
@Bean
public ServiceProperties serviceProperties(){
    return new ServiceProperties(){{
        setService(calendarServiceLogin);
    }};
}
 
Example #18
Source File: WebSecurityConfig.java    From dubbo-postman with 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;
}