org.iaccess.CredentialManager
Class UserProfile

java.lang.Object
  extended by org.iaccess.CredentialManager.UserProfile

public class UserProfile
extends java.lang.Object

Keeps information of users/opponents active credentials. Provides necessary methods for retrieving profile information.

See Also:
TSessionInfo

Constructor Summary
UserProfile()
           
 
Method Summary
static boolean containts(java.lang.String credential, long sessionValidNotAfter)
          Checks if a user credential exists in the user profile, and if the user credential has validity longer than a current session expiration time.
static boolean containts(java.lang.String identity, java.lang.String credential)
          Checks if a user credential exists in the user profile.
static java.util.Vector getCredentials(java.lang.String identity)
          Returns the current set of active/presented credentials of a given identity.
static java.util.Vector getCredentials(java.lang.String identity, long sessionValidNotAfter)
          Returns a set of presented credentials of a given identity (logic level format) but valid for a current session time validity.
static java.lang.String getEntityLogicIDCredOfSSL(java.lang.String identity)
          Returns an identity credential (logic format) of an SSL identity token from a given user identity.
static java.lang.String getX500Name(java.lang.String Identity)
          Looks up in the hashtable to find the X500 Name of the given logic identity.
static void updateOngoingProfile(java.lang.String identity, java.lang.String credential)
          Updates a user profile given a user identity and a user credential.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserProfile

public UserProfile()
Method Detail

updateOngoingProfile

public static void updateOngoingProfile(java.lang.String identity,
                                        java.lang.String credential)
Updates a user profile given a user identity and a user credential. If there is no profile for the given identity , the function creates one. The credential is added if it does not exist in the profile.


containts

public static boolean containts(java.lang.String identity,
                                java.lang.String credential)
Checks if a user credential exists in the user profile.

Parameters:
identity - a user identity
credential - a user credential of a negotiaiton level format (id,issuer or id,attribute,issuer)
Returns:
if a credential exists in a user profile and is valid for a given session time validity.

containts

public static boolean containts(java.lang.String credential,
                                long sessionValidNotAfter)
Checks if a user credential exists in the user profile, and if the user credential has validity longer than a current session expiration time.

Parameters:
credential - a user credential of a negotiaiton level format (id,issuer or id,attribute,issuer)
sessionValidNotAfter - a current session espiration time
Returns:
if a credential exists in a user profile and is valid for a given session time validity.

getEntityLogicIDCredOfSSL

public static java.lang.String getEntityLogicIDCredOfSSL(java.lang.String identity)
Returns an identity credential (logic format) of an SSL identity token from a given user identity. Returns null if no SSL token is found.

On each SSL connection establishment by an opponent, its SSL logic identity token is stored.

If "john_couk" identity is given, the function would return "john_couk,california_state_ca".

We assume the use uses a single identity token (for SSL) during a negotiation process.

Parameters:
identity - logic level identity
Returns:
a logic format identity token of the used X.509 token for SSL connection.

getCredentials

public static java.util.Vector getCredentials(java.lang.String identity)
Returns the current set of active/presented credentials of a given identity. Logic level format.


getCredentials

public static java.util.Vector getCredentials(java.lang.String identity,
                                              long sessionValidNotAfter)
Returns a set of presented credentials of a given identity (logic level format) but valid for a current session time validity.


getX500Name

public static java.lang.String getX500Name(java.lang.String Identity)
Looks up in the hashtable to find the X500 Name of the given logic identity. The X500 name is stored from the SSL identity token used by the opponent for establishing SSL connections.