Package xal.plugin.essrbac
Class DummyRbacLogin
java.lang.Object
xal.plugin.essrbac.DummyRbacLogin
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(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.String[]getRolesForUser(String ip, String username) Returns the list of all roles for the provided username.
-
Constructor Details
-
DummyRbacLogin
public DummyRbacLogin()
-
-
Method Details
-
getRolesForUser
Description copied from interface:RBACLoginReturns the list of all roles for the provided username.RBACExceptionis thrown in case of an error.- Specified by:
getRolesForUserin interfaceRBACLogin- Parameters:
ip- the host IPusername- 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:RBACLoginAuthenticates the user using username and password. The method returns the Token if authentication was successful or throws aAccessDeniedExceptionif authentication failed.- Specified by:
authenticatein interfaceRBACLogin- 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 errorAccessDeniedException
-
authenticate
public RBACSubject authenticate(String username, char[] password, String preferredRole) throws AccessDeniedException, RBACException Description copied from interface:RBACLoginAuthenticates the user using username, password and preferred role. The method returns the Token if authentication was successful or throws aAccessDeniedExceptionif authentication failed.- Specified by:
authenticatein interfaceRBACLogin- 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 errorAccessDeniedException
-
authenticate
public RBACSubject authenticate(String username, char[] password, String preferredRole, String ip) throws AccessDeniedException, RBACException Description copied from interface:RBACLoginAuthenticates the user using username and password, preferred role and ip. The method returns the Token if authentication was successful or throws aAccessDeniedExceptionif authentication failed.- Specified by:
authenticatein interfaceRBACLogin- 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 errorAccessDeniedException
-