ch.epfl.tequila.client.model
Class TequilaPrincipal

java.lang.Object
  extended by ch.epfl.tequila.client.model.TequilaPrincipal
All Implemented Interfaces:
java.security.Principal

public final class TequilaPrincipal
extends java.lang.Object
implements java.security.Principal

Principal holding the values returned by the Tequila server after a successful authentification.

See Also:
Principal

Constructor Summary
TequilaPrincipal()
           
 
Method Summary
 java.lang.String getAttribute(java.lang.String name)
          Returns the attribute having the given name.
 java.util.Map getAttributes()
          Returns the user attributes.
 java.lang.String getHost()
          Returns the host the user is coming from.
 java.lang.String getName()
          Returns the user name.
 java.lang.String getOrg()
          Returns the organization that did the actual authentication.
 java.lang.String getUser()
          Returns the user name.
 void setAttributes(java.util.Map attributes)
          Sets the user attributes.
 void setHost(java.lang.String host)
          Sets the user host.
 void setOrg(java.lang.String org)
          Sets the organization that did the actual authentication.
 void setUser(java.lang.String user)
          Sets the user name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode
 

Constructor Detail

TequilaPrincipal

public TequilaPrincipal()
Method Detail

getUser

public java.lang.String getUser()
Returns the user name.

Returns:
the user name.

setUser

public void setUser(java.lang.String user)
Sets the user name.

Parameters:
user - the user name.

getName

public java.lang.String getName()
Returns the user name.

Specified by:
getName in interface java.security.Principal
Returns:
the user name.

getHost

public java.lang.String getHost()
Returns the host the user is coming from. Beware it can be a proxy.

Returns:
the host the user is coming from. Beware it can be a proxy.

setHost

public void setHost(java.lang.String host)
Sets the user host.

Parameters:
host - the user host.

getOrg

public java.lang.String getOrg()
Returns the organization that did the actual authentication.

Returns:
the organization that did the actual authentication.

setOrg

public void setOrg(java.lang.String org)
Sets the organization that did the actual authentication.

Parameters:
org - the organization that did the actual authentication.

getAttributes

public java.util.Map getAttributes()
Returns the user attributes.

Returns:
the user attributes.

setAttributes

public void setAttributes(java.util.Map attributes)
Sets the user attributes.

Parameters:
attributes - the user attributes.

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Returns the attribute having the given name.

Parameters:
name - the attribute name.
Returns:
the attribute having the given name.

toString

public java.lang.String toString()
Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object