Package xal.rbac

Interface RBACLogin

All Known Implementing Classes:
DummyRbacLogin, EssRbacLogin

public interface RBACLogin
RBACLogin is the entry point for authentication of user.
Author:
Ivo List
  • Method Summary

    Modifier and Type
    Method
    Description
    authenticate(String username, char[] password)
    Authenticates the user using username and password.
    authenticate(String username, char[] password, String preferredRole)
    Authenticates the user using username, password and preferred role.
    authenticate(String username, char[] password, String preferredRole, String ip)
    Authenticates the user using username and password, preferred role and ip.
    getRolesForUser(String ip, String username)
    Returns the list of all roles for the provided username.
    static RBACLogin
    Instantiate a new RBACLogin by calling xal.extensions.application.rbac.RBACPlugin.getRBACLoginInstance()
  • Method Details

    • getRolesForUser

      String[] getRolesForUser(String ip, String username) throws RBACException
      Returns the list of all roles for the provided username. RBACException is thrown in case of an error.
      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

      RBACSubject authenticate(String username, char[] password) throws AccessDeniedException, RBACException
      Authenticates the user using username and password. The method returns the Token if authentication was successful or throws a AccessDeniedException if authentication failed.
      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

      RBACSubject authenticate(String username, char[] password, String preferredRole) throws AccessDeniedException, RBACException
      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.
      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

      RBACSubject authenticate(String username, char[] password, String preferredRole, String ip) throws AccessDeniedException, RBACException
      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.
      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
    • newRBACLogin

      static RBACLogin newRBACLogin()
      Instantiate a new RBACLogin by calling xal.extensions.application.rbac.RBACPlugin.getRBACLoginInstance()
      Returns:
      a new RBACLogin