com.atlassian.confluence.security.seraph
Class ConfluenceUserPrincipal

java.lang.Object
  extended by com.atlassian.confluence.security.seraph.ConfluenceUserPrincipal
All Implemented Interfaces:
java.io.Serializable, java.security.Principal

public class ConfluenceUserPrincipal
extends java.lang.Object
implements java.security.Principal, java.io.Serializable

Principal that contains a user key.

This class is saved in the session instead of ConfluenceUser in order to avoid bugs caused by the use of stale ConfluenceUser value from the session.

Since:
5.3
See Also:
Serialized Form

Constructor Summary
ConfluenceUserPrincipal(ConfluenceUser user)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
           
 com.atlassian.sal.api.user.UserKey getUserKey()
           
 int hashCode()
           
static ConfluenceUserPrincipal of(java.security.Principal principal)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfluenceUserPrincipal

public ConfluenceUserPrincipal(ConfluenceUser user)
Method Detail

toString

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

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object

hashCode

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

getName

public java.lang.String getName()
Specified by:
getName in interface java.security.Principal

getUserKey

public com.atlassian.sal.api.user.UserKey getUserKey()

of

public static ConfluenceUserPrincipal of(java.security.Principal principal)


Copyright © 2003-2014 Atlassian. All Rights Reserved.