Java Code Examples for org.jasig.cas.client.validation.Cas20ProxyTicketValidator#setAllowedProxyChains()
The following examples show how to use
org.jasig.cas.client.validation.Cas20ProxyTicketValidator#setAllowedProxyChains() .
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: CasTicketValidatorUtils.java From shiro-cas-spring-boot-starter with Apache License 2.0 | 5 votes |
protected static TicketValidator buildCas30TicketValidator(final ShiroCasProperties casProperties) { final boolean allowAnyProxy = casProperties.isAcceptAnyProxy(); final String allowedProxyChains = casProperties.getAllowedProxyChains(); final String casServerUrlPrefix = casProperties.getCasServerUrlPrefix(); final Class<? extends Cas20ServiceTicketValidator> ticketValidatorClass = StringUtils.hasText(casProperties.getTicketValidatorClass()) ? ReflectUtils.loadClass(casProperties.getTicketValidatorClass()) : null; final Cas20ServiceTicketValidator validator; if (allowAnyProxy || CommonUtils.isNotBlank(allowedProxyChains)) { final Cas20ProxyTicketValidator v = createNewTicketValidator(ticketValidatorClass, casServerUrlPrefix, Cas30ProxyTicketValidator.class); v.setAcceptAnyProxy(allowAnyProxy); v.setAllowedProxyChains(CommonUtils.createProxyList(allowedProxyChains)); validator = v; } else { validator = createNewTicketValidator(ticketValidatorClass, casServerUrlPrefix, Cas30ServiceTicketValidator.class); } validator.setProxyCallbackUrl(casProperties.getProxyCallbackUrl()); validator.setProxyGrantingTicketStorage(proxyGrantingTicketStorage); HttpURLConnectionFactory factory = new HttpsURLConnectionFactory( HttpsURLConnection.getDefaultHostnameVerifier(), getSSLConfig(casProperties)); validator.setURLConnectionFactory(factory); validator.setProxyRetriever(new Cas20ProxyRetriever(casServerUrlPrefix, casProperties.getEncoding(), factory)); validator.setRenew(casProperties.isRenew()); validator.setEncoding(casProperties.getEncoding()); return validator; }
Example 2
Source File: CasTicketValidatorUtils.java From shiro-cas-spring-boot-starter with Apache License 2.0 | 5 votes |
protected static TicketValidator buildCas20TicketValidator(final ShiroCasProperties casProperties) { final boolean allowAnyProxy = casProperties.isAcceptAnyProxy(); final String allowedProxyChains = casProperties.getAllowedProxyChains(); final String casServerUrlPrefix = casProperties.getCasServerUrlPrefix(); final Class<? extends Cas20ServiceTicketValidator> ticketValidatorClass = StringUtils.hasText(casProperties.getTicketValidatorClass()) ? ReflectUtils.loadClass(casProperties.getTicketValidatorClass()) : null; final Cas20ServiceTicketValidator validator; if (allowAnyProxy || CommonUtils.isNotBlank(allowedProxyChains)) { final Cas20ProxyTicketValidator v = createNewTicketValidator(ticketValidatorClass, casServerUrlPrefix, Cas20ProxyTicketValidator.class); v.setAcceptAnyProxy(allowAnyProxy); v.setAllowedProxyChains(CommonUtils.createProxyList(allowedProxyChains)); validator = v; } else { validator = createNewTicketValidator(ticketValidatorClass, casServerUrlPrefix, Cas20ServiceTicketValidator.class); } validator.setProxyCallbackUrl(casProperties.getProxyCallbackUrl()); validator.setProxyGrantingTicketStorage(proxyGrantingTicketStorage); HttpURLConnectionFactory factory = new HttpsURLConnectionFactory( HttpsURLConnection.getDefaultHostnameVerifier(), getSSLConfig(casProperties)); validator.setURLConnectionFactory(factory); validator.setProxyRetriever(new Cas20ProxyRetriever(casServerUrlPrefix, casProperties.getEncoding(), factory)); validator.setRenew(casProperties.isRenew()); validator.setEncoding(casProperties.getEncoding()); return validator; }