com.atlassian.crowd.util
Class SSOUtils

java.lang.Object
  extended by com.atlassian.crowd.util.SSOUtils

public class SSOUtils
extends java.lang.Object


Constructor Summary
SSOUtils()
           
 
Method Summary
static boolean isCookieDomainValid(java.lang.String cookieDomain, java.lang.String hostname)
          Given a hostname, this method tests if the supplied cookie domain is legal, following RFC-2965 as closely as possible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSOUtils

public SSOUtils()
Method Detail

isCookieDomainValid

public static boolean isCookieDomainValid(java.lang.String cookieDomain,
                                          java.lang.String hostname)
Given a hostname, this method tests if the supplied cookie domain is legal, following RFC-2965 as closely as possible. This method assumes sane input to the extend that both the hostname and domain string MUST be valid, or the result is unspecified. Note that this validation does NOT implement the 2- versus 3-period rules that were originally introduced by Netscape (see http://curl.haxx.se/rfc/cookie_spec.html), as these were never properly and consistently implemented and are no part of RFC-2965.

Parameters:
cookieDomain - a cookie domain.
hostname - the host part of a URL.
Returns:
true if the cookie domain is valid for the given hostname, false otherwise.


Copyright © 2010 Atlassian. All Rights Reserved.