congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Cas20ServiceTicketValidator
Code IndexAdd Tabnine to your IDE (free)

How to use
Cas20ServiceTicketValidator
in
org.jasig.cas.client.validation

Best Java code snippets using org.jasig.cas.client.validation.Cas20ServiceTicketValidator (Showing top 20 results out of 315)

origin: apache/shiro

protected TicketValidator createTicketValidator() {
  String urlPrefix = getCasServerUrlPrefix();
  if ("saml".equalsIgnoreCase(getValidationProtocol())) {
    return new Saml11TicketValidator(urlPrefix);
  }
  return new Cas20ServiceTicketValidator(urlPrefix);
}

origin: apereo/java-cas-client

  protected void startInternal() throws LifecycleException {
    super.startInternal();
    this.ticketValidator = new Cas20ServiceTicketValidator(getCasServerUrlPrefix());
    if (getEncoding() != null) {
      this.ticketValidator.setEncoding(getEncoding());
    }
    this.ticketValidator.setProxyCallbackUrl(getProxyCallbackUrl());
    this.ticketValidator.setProxyGrantingTicketStorage(ProxyCallbackValve.getProxyGrantingTicketStorage());
    this.ticketValidator.setRenew(isRenew());
  }
}
origin: org.jasig.cas/com.springsource.org.jasig.cas.client

  validator = v;
} else {
  validator = new Cas20ServiceTicketValidator(casServerUrlPrefix);
validator.setProxyCallbackUrl(getPropertyFromInitParams(filterConfig, "proxyCallbackUrl", null));
validator.setProxyGrantingTicketStorage(this.proxyGrantingTicketStorage);
validator.setProxyRetriever(new Cas20ProxyRetriever(casServerUrlPrefix, getPropertyFromInitParams(filterConfig, "encoding", null)));
validator.setRenew(parseBoolean(getPropertyFromInitParams(filterConfig, "renew", "false")));
validator.setEncoding(getPropertyFromInitParams(filterConfig, "encoding", null));
validator.setCustomParameters(additionalParameters);
validator.setHostnameVerifier(getHostnameVerifier(filterConfig));
origin: apereo/java-cas-client

@Before
public void setUp() throws Exception {
  this.proxyGrantingTicketStorage = getProxyGrantingTicketStorage();
  this.ticketValidator = new Cas20ServiceTicketValidator(CONST_CAS_SERVER_URL_PREFIX + "8088");
  this.ticketValidator.setProxyCallbackUrl("test");
  this.ticketValidator.setProxyGrantingTicketStorage(getProxyGrantingTicketStorage());
  this.ticketValidator.setProxyRetriever(getProxyRetriever());
  this.ticketValidator.setRenew(true);
}
origin: apereo/java-cas-client

      this.defaultServiceTicketValidatorClass);
validator.setProxyCallbackUrl(getString(ConfigurationKeys.PROXY_CALLBACK_URL));
validator.setProxyGrantingTicketStorage(this.proxyGrantingTicketStorage);
validator.setURLConnectionFactory(factory);
validator.setProxyRetriever(new Cas20ProxyRetriever(casServerUrlPrefix, getString(ConfigurationKeys.ENCODING), factory));
validator.setRenew(getBoolean(ConfigurationKeys.RENEW));
validator.setEncoding(getString(ConfigurationKeys.ENCODING));
validator.setCustomParameters(additionalParameters);
return validator;
origin: kakawait/cas-security-spring-boot-starter

  @Override
  protected void configure(Cas20ServiceTicketValidator ticketValidator) {
    super.configure(ticketValidator);
    if (proxyGrantingTicketStorage != null) {
      ticketValidator.setProxyGrantingTicketStorage(proxyGrantingTicketStorage);
    }
    if (proxyRetriever != null) {
      ticketValidator.setProxyRetriever(proxyRetriever);
    }
    if (StringUtils.hasText(proxyCallbackUrl)) {
      ticketValidator.setProxyCallbackUrl(proxyCallbackUrl);
    }
  }
}
origin: kakawait/cas-security-spring-boot-starter

  @Override
  public Authentication authenticate(Authentication authentication) throws AuthenticationException {
    if (authentication.getDetails() instanceof ProxyCallbackAndServiceAuthenticationDetails &&
        getTicketValidator() instanceof Cas20ServiceTicketValidator) {
      String proxyCallbackUrl = ((ProxyCallbackAndServiceAuthenticationDetails) authentication.getDetails())
          .getProxyCallbackUrl();
      ((Cas20ServiceTicketValidator) getTicketValidator()).setProxyCallbackUrl(proxyCallbackUrl);
    }
    return super.authenticate(authentication);
  }
}
origin: apereo/java-cas-client

  protected void startInternal() throws LifecycleException {
    super.startInternal();
    this.ticketValidator = new Cas20ServiceTicketValidator(getCasServerUrlPrefix());
    if (getEncoding() != null) {
      this.ticketValidator.setEncoding(getEncoding());
    }
    this.ticketValidator.setProxyCallbackUrl(getProxyCallbackUrl());
    this.ticketValidator.setProxyGrantingTicketStorage(ProxyCallbackValve.getProxyGrantingTicketStorage());
    this.ticketValidator.setRenew(isRenew());
  }
}
origin: kakawait/cas-security-spring-boot-starter

  @Override
  public Authentication authenticate(Authentication authentication) {
    if (authentication.getDetails() instanceof ProxyCallbackAndServiceAuthenticationDetails &&
        getTicketValidator() instanceof Cas20ServiceTicketValidator) {
      String proxyCallbackUrl = ((ProxyCallbackAndServiceAuthenticationDetails) authentication.getDetails())
          .getProxyCallbackUrl();
      ((Cas20ServiceTicketValidator) getTicketValidator()).setProxyCallbackUrl(proxyCallbackUrl);
    }
    return super.authenticate(authentication);
  }
}
origin: apereo/java-cas-client

  protected void startInternal() throws LifecycleException {
    super.startInternal();
    this.ticketValidator = new Cas20ServiceTicketValidator(getCasServerUrlPrefix());
    if (getEncoding() != null) {
      this.ticketValidator.setEncoding(getEncoding());
    }
    this.ticketValidator.setProxyCallbackUrl(getProxyCallbackUrl());
    this.ticketValidator.setProxyGrantingTicketStorage(ProxyCallbackValve.getProxyGrantingTicketStorage());
    this.ticketValidator.setRenew(isRenew());
  }
}
origin: stackoverflow.com

@Bean
 public TicketValidator ticketValidator() {
   return new Cas20ServiceTicketValidator("https://localhost:8443/cas/p3");
 }
origin: org.jasig.cas.client/cas-client-integration-tomcat-v7

  protected void startInternal() throws LifecycleException {
    super.startInternal();
    this.ticketValidator = new Cas20ServiceTicketValidator(getCasServerUrlPrefix());
    if (getEncoding() != null) {
      this.ticketValidator.setEncoding(getEncoding());
    }
    this.ticketValidator.setProxyCallbackUrl(getProxyCallbackUrl());
    this.ticketValidator.setProxyGrantingTicketStorage(ProxyCallbackValve.getProxyGrantingTicketStorage());
    this.ticketValidator.setRenew(isRenew());
  }
}
origin: jgribonvald/demo-spring-security-cas

@Bean
public Cas20ServiceTicketValidator cas20ServiceTicketValidator() {
  return new Cas20ServiceTicketValidator(env.getRequiredProperty(CAS_URL_PREFIX));
}
origin: apereo/java-cas-client

  public void start() throws LifecycleException {
    super.start();
    this.ticketValidator = new Cas20ServiceTicketValidator(getCasServerUrlPrefix());
    if (getEncoding() != null) {
      this.ticketValidator.setEncoding(getEncoding());
    }
    this.ticketValidator.setProxyCallbackUrl(getProxyCallbackUrl());
    this.ticketValidator.setProxyGrantingTicketStorage(ProxyCallbackValve.getProxyGrantingTicketStorage());
    this.ticketValidator.setRenew(isRenew());
    lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null);
    logger.info("Startup completed.");
  }
}
origin: kakawait/cas-security-spring-boot-starter

@Override
public TicketValidator build() {
  Cas20ServiceTicketValidator ticketValidator = new Cas20ServiceTicketValidator(casServerUrlPrefix);
  if (proxyChainsValidation != null) {
    logger.warn(OMISSION_MESSAGE_TEMPLATE, "proxyChainsValidation");
  }
  if (proxyChains != null) {
    logger.warn(OMISSION_MESSAGE_TEMPLATE, "proxyChains");
  }
  if (allowEmptyProxyChain != null) {
    logger.warn(OMISSION_MESSAGE_TEMPLATE, "allowEmptyProxyChain");
  }
  configure(ticketValidator);
  return ticketValidator;
}
origin: org.apache.shiro/shiro-cas

protected TicketValidator createTicketValidator() {
  String urlPrefix = getCasServerUrlPrefix();
  if ("saml".equalsIgnoreCase(getValidationProtocol())) {
    return new Saml11TicketValidator(urlPrefix);
  }
  return new Cas20ServiceTicketValidator(urlPrefix);
}

origin: com.centit.framework/framework-config

@Override
protected AuthenticationProvider getAuthenticationProvider() {
  CasAuthenticationProvider casAuthenticationProvider = new CasAuthenticationProvider();
  casAuthenticationProvider.setUserDetailsService(centitUserDetailsService);
  casAuthenticationProvider.setServiceProperties(createCasServiceProperties());
  casAuthenticationProvider.setTicketValidator(new Cas20ServiceTicketValidator(env.getProperty("login.cas.casHome")));
  casAuthenticationProvider.setKey(env.getProperty("app.key"));
  return casAuthenticationProvider;
}
origin: org.apereo.cas/cas-server-core-tickets

private AbstractUrlBasedTicketValidator buildCasClientTicketValidator(final String prefix) {
  val validatorType = casProperties.getClient().getValidatorType();
  if (validatorType == CasJavaClientProperties.ClientTicketValidatorTypes.CAS10) {
    return new Cas10TicketValidator(prefix);
  }
  if (validatorType == CasJavaClientProperties.ClientTicketValidatorTypes.CAS20) {
    return new Cas20ServiceTicketValidator(prefix);
  }
  return new Cas30ServiceTicketValidator(prefix);
}
origin: XiaoMi/shepher

public Cas20ProxyReceivingTicketValidationFilter getCas20ProxyReceivingTicketValidationFilter() {
  Cas20ProxyReceivingTicketValidationFilter cas20ProxyReceivingTicketValidationFilter = new Cas20ProxyReceivingTicketValidationFilter();
  cas20ProxyReceivingTicketValidationFilter.setServerName(serverUrl);
  cas20ProxyReceivingTicketValidationFilter.setTicketValidator(new Cas20ServiceTicketValidator(casServerUrlPrefix));
  cas20ProxyReceivingTicketValidationFilter.setRedirectAfterValidation(true);
  return cas20ProxyReceivingTicketValidationFilter;
}
origin: stackoverflow.com

  throws IOException, NamingException {
final String casServerLocationSSL = securityProperty().getCASServer();
final Cas20ServiceTicketValidator ticketValidator = new Cas20ServiceTicketValidator(casServerLocationSSL);
org.jasig.cas.client.validationCas20ServiceTicketValidator

Javadoc

Implementation of the TicketValidator that will validate Service Tickets in compliance with the CAS 2.

Most used methods

  • <init>
    Constructs an instance of the CAS 2.0 Service Ticket Validator with the supplied CAS server url pref
  • setProxyCallbackUrl
  • setProxyGrantingTicketStorage
  • setRenew
  • setEncoding
  • setProxyRetriever
  • customParseResponse
    Template method if additional custom parsing (such as Proxying) needs to be done.
  • extractCustomAttributes
    Default attribute parsing of attributes that look like the following:
  • getEncoding
  • setCustomParameters
  • encodeUrl
  • getURLConnectionFactory
  • encodeUrl,
  • getURLConnectionFactory,
  • parseAuthenticationFailureFromResponse,
  • parsePrincipalFromResponse,
  • parseProxyGrantingTicketFromResponse,
  • setHostnameVerifier,
  • setURLConnectionFactory,
  • validate

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now