Does anyone have a valid example in a CAS Proxy Granting Ticket?

I need to implement a CAS Proxy ticket issuing system.

Therefore, I need to understand the system. There is a good document here , but I have no idea about the proxy server that I need.

Can someone explain this to me?

+6
authentication cas single-sign-on
source share
1 answer

CAS will call pgtURL to provide a special ticket that will allow this application to purchase new tickets for other applications.
This is the setting in web.xml :

<servlet> <servlet-name>casproxy</servlet-name> <servlet-class>edu.yale.its.tp.cas.proxy.ProxyTicketReceptor</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>casproxy</servlet-name> <url-pattern>/casProxy/*</url-pattern> </servlet-mapping> 

To get a new ticket for another service with a special ticket:

 SecurityContext sc = SecurityContextHolder.getContext(); CasAuthenticationToken auth = (CasAuthenticationToken)sc.getAuthentication(); String pgtIOU = auth.getProxyGrantingTicketIou(); String newTicket = ProxyTicketReceptor.getProxyTicket(pgtIOU, anotherService); 

Then you redirect to this service by providing him with a new ticket.

+3
source share

All Articles