Relax restriction on empty Strings for proxy callback URL, as this should be an empty String if no proxy callback was requested during service ticket validation.

This commit is contained in:
Ben Alex 2004-07-03 00:47:46 +00:00
parent b957b5e25b
commit 2cb3703253
1 changed files with 9 additions and 3 deletions

View File

@ -55,7 +55,8 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken
* @param proxyList the list of proxies from CAS (cannot be
* <code>null</code>)
* @param proxyGrantingTicketIou the PGT-IOU ID from CAS (cannot be
* <code>null</code>)
* <code>null</code>, but may be an empty <code>String</code> if no
* PGT-IOU ID was provided)
*
* @throws IllegalArgumentException if a <code>null</code> was passed
*/
@ -65,8 +66,7 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken
if ((key == null) || ("".equals(key)) || (principal == null)
|| "".equals(principal) || (credentials == null)
|| "".equals(credentials) || (authorities == null)
|| (proxyList == null) || (proxyGrantingTicketIou == null)
|| ("".equals(proxyGrantingTicketIou))) {
|| (proxyList == null) || (proxyGrantingTicketIou == null)) {
throw new IllegalArgumentException(
"Cannot pass null or empty values to constructor");
}
@ -127,6 +127,12 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken
return this.principal;
}
/**
* Obtains the proxy granting ticket IOU.
*
* @return the PGT IOU-ID or an empty <code>String</code> if no proxy
* callback was requested when validating the service ticket
*/
public String getProxyGrantingTicketIou() {
return proxyGrantingTicketIou;
}