edu.internet2.middleware.shibboleth.wayf.plugins.provider
Class SamlCookiePlugin.SamlIdPCookie

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.wayf.plugins.provider.SamlCookiePlugin.SamlIdPCookie
Enclosing class:
SamlCookiePlugin

public final class SamlCookiePlugin.SamlIdPCookie
extends Object

Class to abstract away the saml cookie for us.


Field Summary
private  String domain
          The associated domain.
private  List<String> idPList
          The IdPs.
private  HttpServletRequest req
          The associated request.
private  HttpServletResponse res
          The associated response.
 
Constructor Summary
private SamlCookiePlugin.SamlIdPCookie(HttpServletRequest request, HttpServletResponse response, String domainName)
          Create a SamlCookie with no data inside.
private SamlCookiePlugin.SamlIdPCookie(String data, HttpServletRequest request, HttpServletResponse response, String domainName)
          Constructs a SamlIdPCookie from the provided string (which is the raw data.
 
Method Summary
private  void addIdPName(String idPName, int expiration)
          Add the specified Shibboleth IdP Name to the cookie list or move to the front and then write it back.
 void deleteIdPName(String origin, int expiration)
          Remove origin from the cachedata and write it back.
 List<String> getIdPList()
          Return the list of Idps for this cookie.
private  void writeCookie(int expiration)
          Write back the cookie.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

req

private final HttpServletRequest req
The associated request.


res

private final HttpServletResponse res
The associated response.


domain

private final String domain
The associated domain.


idPList

private final List<String> idPList
The IdPs.

Constructor Detail

SamlCookiePlugin.SamlIdPCookie

private SamlCookiePlugin.SamlIdPCookie(String data,
                                       HttpServletRequest request,
                                       HttpServletResponse response,
                                       String domainName)
Constructs a SamlIdPCookie from the provided string (which is the raw data.

Parameters:
data - the information read from the cookie.
request - Describes the current request.
response - Describes the current response.
domainName - - if non null the domain for any *created* cookie.

SamlCookiePlugin.SamlIdPCookie

private SamlCookiePlugin.SamlIdPCookie(HttpServletRequest request,
                                       HttpServletResponse response,
                                       String domainName)
Create a SamlCookie with no data inside.

Parameters:
domainName - - if non null, the domain of the new cookie
request - Describes the current request.
response - Describes the current response.
Method Detail

addIdPName

private void addIdPName(String idPName,
                        int expiration)
Add the specified Shibboleth IdP Name to the cookie list or move to the front and then write it back. We always add to the front (and remove from wherever it was)

Parameters:
idPName - - The name to be added
expiration - - The expiration of the cookie or zero if it is to be unchanged

deleteIdPName

public void deleteIdPName(String origin,
                          int expiration)
Remove origin from the cachedata and write it back.

Parameters:
origin - what to remove.
expiration - How long it will live.

writeCookie

private void writeCookie(int expiration)
Write back the cookie.

Parameters:
expiration - How long it will live

getIdPList

public List<String> getIdPList()
Return the list of Idps for this cookie.

Returns:
The list.


Copyright © 1999-2012. All Rights Reserved.