Re: Check SSL
Re: Check SSL
- Subject: Re: Check SSL
- From: Andrew Lindesay <email@hidden>
- Date: Mon, 19 May 2008 20:42:20 +1200
WO 5.4;
WORequest.isSecure()
WO 5.3.3;
public static boolean isRequestTransportedSecurely(WORequest request)
{
if(null==request)
throw new IllegalArgumentException("a non-null request must be
supplied in order to establish if it's secure or not.");
String secureFlagS = request.headerForKey("https");
if(null!=secureFlagS)
return LEStringHelper.booleanForString(secureFlagS);
else
{
String serverPortS = request.headerForKey("server_port");
if(null!=serverPortS)
{
try { return (443==Integer.parseInt(serverPortS)); }
catch(NumberFormatException nfe) { /* ignore */ }
}
String servletServerPortS = request.headerForKey("x-webobjects-
servlet-server-port");
if(null!=servletServerPortS)
{
try { return (443==Integer.parseInt(servletServerPortS)); }
catch(NumberFormatException nfe) { /* ignore */ }
}
}
return false;
}
cheers.
I've made a Direct Action that make authentication, but I need
that the communication between the client-server is secure, under SSL.
Is there a way to check if the request was sent under SSL?l
___
Andrew Lindesay
www.lindesay.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Check SSL (From: "Daniele Corti" <email@hidden>) |