Skip to content

farrukhmpk/cas-client-support-distributed-infinispan

 
 

Repository files navigation

CAS Client and distributed Infinispan Integration

This library provides integration with distributed Infinispan cache.

Building

Checkout the code and use the following maven command to build the project

mvn clean install

Usage

Below is an example on how to use this library on a Spring Boot application on Wildfly/JBoss

Dependency

<dependency>
    <groupId>org.kamranzafar.cas.client</groupId>
    <artifactId>cas-client-support-distributed-infinispan</artifactId>
    <version>1.0</version>
</dependency>

Example

// Lookup the relevant Cache that will be used to store CAS proxy granting tickets
@Bean
public Cache defaultCache() throws NamingException {
    return (Cache) ((DefaultCacheContainer) new JndiTemplate().lookup("java:jboss/infinispan/container/sso")).getCache();
}
.
.
.
// Create the bean
@Bean
public ProxyGrantingTicketStorage proxyGrantingTicketStorage(){
    return new InfinispanProxyGrantingTicketStorage(defaultCache());
}
.
.
.
// Setup CasAuthenticationFilter to use Infinispan
CasAuthenticationFilter casAuthenticationFilter = new CasAuthenticationFilter();
casAuthenticationFilter.setProxyGrantingTicketStorage(proxyGrantingTicketStorage());
.
.
// Setup Cas20ProxyTicketValidator to use Infinispan
Cas20ProxyTicketValidator cas20ProxyTicketValidator = new Cas20ProxyTicketValidator("...");
cas20ProxyTicketValidator.setProxyGrantingTicketStorage(proxyGrantingTicketStorage());

About

CAS Client Infinispan Integration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%