Class MidPointPrincipal
- java.lang.Object
-
- com.evolveum.midpoint.security.api.MidPointPrincipal
-
- All Implemented Interfaces:
DebugDumpable
,ShortDumpable
,Serializable
,org.springframework.security.core.userdetails.UserDetails
- Direct Known Subclasses:
GuiProfiledPrincipal
public class MidPointPrincipal extends Object implements org.springframework.security.core.userdetails.UserDetails, DebugDumpable, ShortDumpable
Simple midPoint principal. This principal should contain only the concepts that are essential for midPoint core to work. It should not contain user interface concepts (e.g. adminGuiConfig). For that see GuiProfiledPrincipal.- Author:
- Radovan Semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description MidPointPrincipal(@NotNull FocusType focus)
-
Method Summary
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Constructor Detail
-
MidPointPrincipal
public MidPointPrincipal(@NotNull @NotNull FocusType focus)
-
-
Method Detail
-
getAuthorities
public Collection<Authorization> getAuthorities()
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
getPassword
public String getPassword()
- Specified by:
getPassword
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
getUsername
public String getUsername()
- Specified by:
getUsername
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonExpired
public boolean isAccountNonExpired()
- Specified by:
isAccountNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonLocked
public boolean isAccountNonLocked()
- Specified by:
isAccountNonLocked
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()
- Specified by:
isCredentialsNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
getFocus
@NotNull public @NotNull FocusType getFocus()
Effective identity that is used to execute all actions. Authorizations of this identity will be applied. This is usually the logged-in user. However, this may be the user on behalf who are the actions executed (donor of power) and the real logged-in user may be the attorney.
-
getName
public PolyStringType getName()
-
getOid
public String getOid()
-
getAttorney
public FocusType getAttorney()
Real identity of the logged-in user. Used in cases when there is a difference between logged-in user and the identity that is used to execute actions and evaluate authorizations. This may happen when one user (attorney) has switched identity to another user (donor of power). In that case the identity of the attorney is in this property. The user that was the target of the switch is stored in the "user" property.
-
setAttorney
public void setAttorney(FocusType attorney)
-
getPreviousPrincipal
public MidPointPrincipal getPreviousPrincipal()
Principal that was used before this principal was active. This is used when principals are chained (e.g. attorney)
-
setPreviousPrincipal
public void setPreviousPrincipal(MidPointPrincipal previousPrincipal)
-
getApplicableSecurityPolicy
public SecurityPolicyType getApplicableSecurityPolicy()
-
setApplicableSecurityPolicy
public void setApplicableSecurityPolicy(SecurityPolicyType applicableSecurityPolicy)
-
getDelegatorWithOtherPrivilegesLimitationsCollection
@NotNull public @NotNull Collection<DelegatorWithOtherPrivilegesLimitations> getDelegatorWithOtherPrivilegesLimitationsCollection()
-
addDelegatorWithOtherPrivilegesLimitations
public void addDelegatorWithOtherPrivilegesLimitations(DelegatorWithOtherPrivilegesLimitations value)
-
clone
public MidPointPrincipal clone()
Semi-shallow clone.
-
copyValues
protected void copyValues(MidPointPrincipal clone)
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
debugDumpInternal
protected void debugDumpInternal(StringBuilder sb, int indent)
-
toObjectReference
public ObjectReferenceType toObjectReference()
-
shortDump
public void shortDump(StringBuilder sb)
Description copied from interface:ShortDumpable
Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
shortDump
in interfaceShortDumpable
- Parameters:
sb
- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-
-