Hi.

I have this code for invoke a REST webservice from webapp1 in webapp2:

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) 
throws ServletException, IOException { 
final String targetUrl = "https://localhost:8443/webapp2/protected";;
final CasAuthenticationToken casAuthenticationToken = 
(CasAuthenticationToken) 
SecurityContextHolder.getContext().getAuthentication();
final String proxyTicket = 
casAuthenticationToken.getAssertion().getPrincipal().getProxyTicketFor(targetUrl);

final String response = Http.get(targetUrl + "?ticket=" + 
URLEncoder.encode(proxyTicket, "UTF-8"));

// Logout Webapp2? I don't know

// Do something with response
}

How can I logout for remote application after invoking server-side 
communication using proxy ticket?

A session is created every time that I invoke this code in webapp2. How can 
I logged out/destroy session created in webapp2?

-- 
CAS gitter chatroom: https://gitter.im/apereo/cas
CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
CAS documentation website: https://apereo.github.io/cas
CAS project website: https://github.com/apereo/cas
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/07cfc357-e975-460e-853a-76b839cf2255%40apereo.org.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.

Reply via email to