Re: [Cosign-discuss] Cosign Logout JSP - redirect after logout

2014-09-22 Thread Shanti Suresh
Hi Liam,

Thanks for catching that.  We added a variable to the logout script and it
seems to work now.

Here is the new version:

-cosign_logout.jsp:--

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>




<%
  String requestURL = request.getRequestURL().toString();
  String appURL = requestURL.substring(0,
requestURL.indexOf("app-specific-pattern"));

 // Remove the service Cookie:
  //serviceName+"lsa.umich.edu"
 Cookie killServiceCookie = new Cookie(appURL, null);
 killServiceCookie.setMaxAge(0);
 killServiceCookie.setPath("/");
 killServiceCookie.setSecure(true);
 response.addCookie(killServiceCookie);

// Re-direct to Central Logout URL:
   String site = new String("https://weblogin.umich.edu/cgi-bin/logout";);
   // response.setStatus(response.SC_MOVED_TEMPORARILY);
   //response.setHeader("Location", site);
   response.sendRedirect(site+"?"+appURL);

%>



--end of cosign_logout.jsp---

Appreciate all help!

  -Shanti

On Fri, Sep 19, 2014 at 2:32 PM, Liam Hoekenga  wrote:

> The URL needs to have a trailing slash.
>
> Liam
>
> On Fri, Sep 19, 2014 at 1:52 PM, Shanti Suresh  wrote:
>
>> Hi everyone,
>>
>> Thank you all.
>>
>> On Fri, Sep 19, 2014 at 1:15 PM, Mark Montague  wrote:
>>
>>>
>>>
>>> Include the URL you want the user to be redirected to after logout as
>>> the query string of the logout URL, for example:
>>>
>>> https://weblogin.umich.edu/logout?http://www.lsa.umich.edu/
>>>
>>
>>
>> I had tried that first and it is not working for me.  That's when I
>> wanted to check with you.  I am left at the Weblogin login page.  I bet it
>> is the way I construct the String in the JSP.  Looking at the HTTP traffic,
>> I notice that the redirect URI is not being sent to Weblogin.
>>
>> So I had:
>>
>> --
>>
>>  String site = new String("
>> https://weblogin.umich.edu/cgi-bin/logout?https://editqa.lsa.umich.edu";);
>>response.setStatus(response.SC_MOVED_TEMPORARILY);
>>response.setHeader("Location", site);
>>
>> -
>>
>> I wonder if I need to escape that ":" character.  I couldn't tell if ":"
>> is reserved in JSP.
>>
>>
>> Thanks,
>>
>>   -Shanti
>>
>>
>> --
>> Slashdot TV.  Video for Nerds.  Stuff that Matters.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
>> ___
>> Cosign-discuss mailing list
>> Cosign-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cosign-discuss
>>
>>
>
--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk___
Cosign-discuss mailing list
Cosign-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cosign-discuss


Re: [Cosign-discuss] Cosign Logout JSP - redirect after logout

2014-09-19 Thread Liam Hoekenga
The URL needs to have a trailing slash.

Liam

On Fri, Sep 19, 2014 at 1:52 PM, Shanti Suresh  wrote:

> Hi everyone,
>
> Thank you all.
>
> On Fri, Sep 19, 2014 at 1:15 PM, Mark Montague  wrote:
>
>>
>>
>> Include the URL you want the user to be redirected to after logout as the
>> query string of the logout URL, for example:
>>
>> https://weblogin.umich.edu/logout?http://www.lsa.umich.edu/
>>
>
>
> I had tried that first and it is not working for me.  That's when I wanted
> to check with you.  I am left at the Weblogin login page.  I bet it is the
> way I construct the String in the JSP.  Looking at the HTTP traffic, I
> notice that the redirect URI is not being sent to Weblogin.
>
> So I had:
>
> --
>
>  String site = new String("
> https://weblogin.umich.edu/cgi-bin/logout?https://editqa.lsa.umich.edu";);
>response.setStatus(response.SC_MOVED_TEMPORARILY);
>response.setHeader("Location", site);
>
> -
>
> I wonder if I need to escape that ":" character.  I couldn't tell if ":"
> is reserved in JSP.
>
>
> Thanks,
>
>   -Shanti
>
>
> --
> Slashdot TV.  Video for Nerds.  Stuff that Matters.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
> ___
> Cosign-discuss mailing list
> Cosign-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cosign-discuss
>
>
--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk___
Cosign-discuss mailing list
Cosign-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cosign-discuss


Re: [Cosign-discuss] Cosign Logout JSP - redirect after logout

2014-09-19 Thread Shanti Suresh
Hi everyone,

Thank you all.

On Fri, Sep 19, 2014 at 1:15 PM, Mark Montague  wrote:

>
>
> Include the URL you want the user to be redirected to after logout as the
> query string of the logout URL, for example:
>
> https://weblogin.umich.edu/logout?http://www.lsa.umich.edu/
>


I had tried that first and it is not working for me.  That's when I wanted
to check with you.  I am left at the Weblogin login page.  I bet it is the
way I construct the String in the JSP.  Looking at the HTTP traffic, I
notice that the redirect URI is not being sent to Weblogin.

So I had:

--

 String site = new String("
https://weblogin.umich.edu/cgi-bin/logout?https://editqa.lsa.umich.edu";);
   response.setStatus(response.SC_MOVED_TEMPORARILY);
   response.setHeader("Location", site);

-

I wonder if I need to escape that ":" character.  I couldn't tell if ":" is
reserved in JSP.


Thanks,

  -Shanti
--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk___
Cosign-discuss mailing list
Cosign-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cosign-discuss


Re: [Cosign-discuss] Cosign Logout JSP - redirect after logout

2014-09-19 Thread Mark Montague

On 2014-09-19 12:16, Shanti Suresh wrote:
I would like the user to go to "a" specific site after logging out in 
Weblogin.  Once the user logs out, they should be redirected to 
"www.lsa.umich.edu ", for e.g.


Include the URL you want the user to be redirected to after logout as 
the query string of the logout URL, for example:


https://weblogin.umich.edu/logout?http://www.lsa.umich.edu/

--
  Mark Montague
  m...@catseye.org

--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk___
Cosign-discuss mailing list
Cosign-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cosign-discuss


Re: [Cosign-discuss] Cosign Logout JSP - redirect after logout

2014-09-19 Thread Liam Hoekenga
You pass the URL that you want to redirect the user to as the argument to
the logout CGI.  e.g.

http://weblogin.umich.edu/cgi-bin/logout?http://www.lsa.umich.edu/

Liam

On Fri, Sep 19, 2014 at 12:16 PM, Shanti Suresh  wrote:

> So just to clarify,
>
> I would like the user to go to "a" specific site after logging out in
> Weblogin.  Once the user logs out, they should be redirected to "
> www.lsa.umich.edu", for e.g.
>
> Thanks,
>
> -Shanti
>
>
> On Fri, Sep 19, 2014 at 12:09 PM, Shanti Suresh  wrote:
>
>>
>> Greetings,
>>
>> How do I get Cosign to go the specific site in the logout script?
>>
>> Within a JSP, I have:
>>
>> JSP Logout snippet:--
>> // Re-direct to Central Logout URL:
>>String site = new String("https://weblogin.umich.edu/cgi-bin/logout";);
>>response.setStatus(response.SC_MOVED_TEMPORARILY);
>>response.setHeader("Location", site);
>> -  End of Logout snippet-
>>
>> For reference, the full Cosign Logout JSP is:
>>
>> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>> pageEncoding="ISO-8859-1"%>
>> 
>> 
>>
>> 
>> <%
>>   String[] serverNameParts =
>> HttpServletRequest.getServerName().split(".");
>>   String serviceName;
>>   if(serverNameParts != null && serverNameParts.length != 0){
>> serviceName = serverNameParts[0];
>>   } else {
>> serviceName = "";
>>   }
>>
>>  // Remove the service Cookie, "cosign-service.umich.edu"":
>>  Cookie killServiceCookie = new Cookie(serviceName+"umich.edu",
>> null);
>>  killServiceCookie.setMaxAge(0);
>>  killServiceCookie.setPath("/");
>>  killServiceCookie.setSecure(true);
>>  response.addCookie(killServiceCookie);
>>
>> // Re-direct to Central Logout URL:
>>String site = new String("https://weblogin.umich.edu/cgi-bin/logout";);
>>response.setStatus(response.SC_MOVED_TEMPORARILY);
>>response.setHeader("Location", site);
>> %>
>> 
>> 
>>
>>
>> Thanks!
>>
>>   -Shanti
>>
>
>
>
>
>
>
> --
> Slashdot TV.  Video for Nerds.  Stuff that Matters.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
> ___
> Cosign-discuss mailing list
> Cosign-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cosign-discuss
>
>
--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk___
Cosign-discuss mailing list
Cosign-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cosign-discuss


Re: [Cosign-discuss] Cosign Logout JSP - redirect after logout

2014-09-19 Thread Shanti Suresh
So just to clarify,

I would like the user to go to "a" specific site after logging out in
Weblogin.  Once the user logs out, they should be redirected to "
www.lsa.umich.edu", for e.g.

Thanks,

-Shanti

On Fri, Sep 19, 2014 at 12:09 PM, Shanti Suresh  wrote:

>
> Greetings,
>
> How do I get Cosign to go the specific site in the logout script?
>
> Within a JSP, I have:
>
> JSP Logout snippet:--
> // Re-direct to Central Logout URL:
>String site = new String("https://weblogin.umich.edu/cgi-bin/logout";);
>response.setStatus(response.SC_MOVED_TEMPORARILY);
>response.setHeader("Location", site);
> -  End of Logout snippet-
>
> For reference, the full Cosign Logout JSP is:
>
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
> pageEncoding="ISO-8859-1"%>
> 
> 
>
> 
> <%
>   String[] serverNameParts = HttpServletRequest.getServerName().split(".");
>   String serviceName;
>   if(serverNameParts != null && serverNameParts.length != 0){
> serviceName = serverNameParts[0];
>   } else {
> serviceName = "";
>   }
>
>  // Remove the service Cookie, "cosign-service.umich.edu"":
>  Cookie killServiceCookie = new Cookie(serviceName+"umich.edu", null);
>  killServiceCookie.setMaxAge(0);
>  killServiceCookie.setPath("/");
>  killServiceCookie.setSecure(true);
>  response.addCookie(killServiceCookie);
>
> // Re-direct to Central Logout URL:
>String site = new String("https://weblogin.umich.edu/cgi-bin/logout";);
>response.setStatus(response.SC_MOVED_TEMPORARILY);
>response.setHeader("Location", site);
> %>
> 
> 
>
>
> Thanks!
>
>   -Shanti
>
--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk___
Cosign-discuss mailing list
Cosign-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cosign-discuss