org.syncope.console
Class SyncopeUser

java.lang.Object
  extended by org.syncope.console.SyncopeUser
All Implemented Interfaces:
java.io.Serializable

public class SyncopeUser
extends java.lang.Object
implements java.io.Serializable

SyncopeUser to store in SyncopeSession after the authentication.

See Also:
Serialized Form

Constructor Summary
SyncopeUser(java.lang.String username, java.lang.String roles)
          Create a new Syncope session user
 
Method Summary
 org.apache.wicket.authorization.strategies.role.Roles getRoles()
           
 java.lang.String getUsername()
           
 boolean hasAnyRole(org.apache.wicket.authorization.strategies.role.Roles roles)
          Whether this user has any of the given roles.
 boolean hasRole(java.lang.String role)
          Whether this user has the given role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncopeUser

public SyncopeUser(java.lang.String username,
                   java.lang.String roles)
Create a new Syncope session user

Parameters:
username -
roles - a comma seperated list of roles (corresponding to Syncope's entitlements)
Method Detail

getUsername

public java.lang.String getUsername()

hasAnyRole

public boolean hasAnyRole(org.apache.wicket.authorization.strategies.role.Roles roles)
Whether this user has any of the given roles.

Parameters:
roles - set of roles
Returns:
whether this user has any of the given roles

hasRole

public boolean hasRole(java.lang.String role)
Whether this user has the given role.

Parameters:
role -
Returns:
whether this user has the given role

getRoles

public org.apache.wicket.authorization.strategies.role.Roles getRoles()


Copyright © 2010. All Rights Reserved.