Class DummyRbacLogin

java.lang.Object
xal.plugin.essrbac.DummyRbacLogin
All Implemented Interfaces:
RBACLogin

public class DummyRbacLogin extends Object implements RBACLogin
Dummy RBAC Login extends RBACLogin returning DummyRbacSubject immediately when authenticate is called.
Version:
0.1 28 Jul 2015
Author:
Blaz Kranjc <blaz.kranjc@cosylab.com>
  • Constructor Details

    • DummyRbacLogin

      public DummyRbacLogin()
  • Method Details

    • getRolesForUser

      public String[] getRolesForUser(String ip, String username) throws RBACException
      Description copied from interface: RBACLogin
      Returns the list of all roles for the provided username. RBACException is thrown in case of an error.
      Specified by:
      getRolesForUser in interface RBACLogin
      Parameters:
      ip - the host IP
      username - the username of the user to get assigned roles for
      Returns:
      array of role names assigned to the user
      Throws:
      RBACException - if there was an error
    • authenticate

      public RBACSubject authenticate(String username, char[] password) throws AccessDeniedException, RBACException
      Description copied from interface: RBACLogin
      Authenticates the user using username and password. The method returns the Token if authentication was successful or throws a AccessDeniedException if authentication failed.
      Specified by:
      authenticate in interface RBACLogin
      Parameters:
      username - that will be used for authentication.
      password - that will be used for authentication.
      Returns:
      RBACSubject class representing logged in user
      Throws:
      RBACException - if there is an error
      AccessDeniedException
    • authenticate

      public RBACSubject authenticate(String username, char[] password, String preferredRole) throws AccessDeniedException, RBACException
      Description copied from interface: RBACLogin
      Authenticates the user using username, password and preferred role. The method returns the Token if authentication was successful or throws a AccessDeniedException if authentication failed.
      Specified by:
      authenticate in interface RBACLogin
      Parameters:
      username - that will be used for authentication.
      password - that will be used for authentication.
      preferredRole - the user would prefer to have.
      Returns:
      RBACSubject class representing logged in user
      Throws:
      RBACException - if there is an error
      AccessDeniedException
    • authenticate

      public RBACSubject authenticate(String username, char[] password, String preferredRole, String ip) throws AccessDeniedException, RBACException
      Description copied from interface: RBACLogin
      Authenticates the user using username and password, preferred role and ip. The method returns the Token if authentication was successful or throws a AccessDeniedException if authentication failed.
      Specified by:
      authenticate in interface RBACLogin
      Parameters:
      username - that will be used for authentication.
      password - that will be used for authentication.
      preferredRole - the user would prefer to have.
      ip - address that will be used for authentication.
      Returns:
      RBACSubject class representing logged in user
      Throws:
      RBACException - if there is an error
      AccessDeniedException