at.gv.egiz.moodle.eidconnector.auth.data
Class SubjectAttributesStore

java.lang.Object
  extended by at.gv.egiz.moodle.eidconnector.auth.data.SubjectAttributesStore

public final class SubjectAttributesStore
extends Object

Class that provides a store for SubjectAttributes resulting from successful authentication. Putting SubjectAttributes in the store returns a ticket. For retrieval of the stored attributes this ticket has to be provided. After retrieval the attributes are removed from store invalidating the ticket.

Author:
AT-TUG (Thomas Knall)

Method Summary
 void cleanUp()
          Invokes a cleanup method which removed tickets older than keepTicketForSeconds seconds.
static SubjectAttributesStore getInstance()
           
 SubjectAttributes getSubjectAttributes(String ticket)
           
 String storeSubjectAttributes(String sourceID, SubjectAttributes attributes)
          Stores the SubjectAttributes from a successful authentication and returns a ticket.
 String storeSubjectAttributes(SubjectAttributes attributes)
          Stores the SubjectAttributes from a successful authentication and returns a ticket.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SubjectAttributesStore getInstance()

getSubjectAttributes

public SubjectAttributes getSubjectAttributes(String ticket)

storeSubjectAttributes

public String storeSubjectAttributes(SubjectAttributes attributes)
                              throws NoSuchAlgorithmException
Stores the SubjectAttributes from a successful authentication and returns a ticket.

Parameters:
attributes - The SubjectAttributes.
Returns:
The resulting ticket for later retrieval.
Throws:
NoSuchAlgorithmException - Thrown if the underlying crypto/hash algorithms are not available.

storeSubjectAttributes

public String storeSubjectAttributes(String sourceID,
                                     SubjectAttributes attributes)
                              throws NoSuchAlgorithmException
Stores the SubjectAttributes from a successful authentication and returns a ticket.

Parameters:
sourceID - The sourceID.
attributes - The SubjectAttributes.
Returns:
The resulting ticket for later retrieval.
Throws:
NoSuchAlgorithmException - Thrown if the underlying crypto/hash algorithms (SHA-1) are not available.

cleanUp

public void cleanUp()
Invokes a cleanup method which removed tickets older than keepTicketForSeconds seconds. Note that keepTicketForSeconds <= 0 disables cleanup.



Copyright 2009 EGIZ. All Rights Reserved.