|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.platform.security.api.SessionToken
public class SessionToken
This class is an immutable identifier for a unique session that also maintains the name of the principal for that session. Since this class can be used to authenticate a user, it must be secure in transit if sent to the client. Also it should only be sent to the client who creates the session.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Constructor Summary | |
---|---|
SessionToken()
Fake SessionToken representing a trusted user |
|
SessionToken(MetaMatrixSessionID id,
java.lang.String userName)
The primary constructor that specifies the id, userName, and product info for the session represented by this token. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Return a cloned instance of this object. |
boolean |
equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this instance. |
java.util.UUID |
getSecret()
|
MetaMatrixSessionID |
getSessionID()
Returns unique session identifier |
java.lang.String |
getSessionIDValue()
Returns unique session identifier |
java.lang.String |
getUsername()
Get the principal name for this session's user. |
int |
hashCode()
Overrides Object hashCode method. |
java.lang.String |
toString()
Returns a string representing the current state of the object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public SessionToken()
public SessionToken(MetaMatrixSessionID id, java.lang.String userName)
id
- (long) the unique identifier for the sessionuserName
- (String) the userName for this session
java.lang.IllegalArgumentException
Method Detail |
---|
public java.util.UUID getSecret()
public MetaMatrixSessionID getSessionID()
public java.lang.String getSessionIDValue()
public java.lang.String getUsername()
public boolean equals(java.lang.Object obj)
compareTo()
.
equals
in class java.lang.Object
obj
- the object that this instance is to be compared to.
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
,
Object.equals(Object)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |