Class ClientSecurityUtilities
java.lang.Object
com.inductiveautomation.ignition.common.script.AbstractSecurityUtilities
com.inductiveautomation.ignition.client.script.ClientSecurityUtilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.python.core.PyTuple
getRoles()
static String
getUserRoles
(String username, String password, String authProfile) Retrieves the roles for the specified user.org.python.core.PyTuple
getUserRoles
(org.python.core.PyObject[] values, String[] keywords) protected boolean
isValidUser
(String username, String password, String authProfile) Validates the user credentials against the authentication profile.boolean
validateUser
(org.python.core.PyObject[] values, String[] keywords)
-
Constructor Details
-
ClientSecurityUtilities
public ClientSecurityUtilities()
-
-
Method Details
-
getUserRoles
public org.python.core.PyTuple getUserRoles(org.python.core.PyObject[] values, String[] keywords) throws Exception - Throws:
Exception
-
getUserRoles
protected List<String> getUserRoles(String username, String password, String authProfile) throws Exception Description copied from class:AbstractSecurityUtilities
Retrieves the roles for the specified user.- Specified by:
getUserRoles
in classAbstractSecurityUtilities
- Parameters:
username
- The username to retrieve roles for.password
- The password to validate.authProfile
- The authentication profile to use.- Returns:
- A list of roles for the user, or null if the user is not valid.
- Throws:
IllegalArgumentException
- if the provided auth profile doesn't exist.Exception
-
validateUser
- Throws:
Exception
-
isValidUser
protected boolean isValidUser(String username, String password, String authProfile) throws Exception Description copied from class:AbstractSecurityUtilities
Validates the user credentials against the authentication profile.- Specified by:
isValidUser
in classAbstractSecurityUtilities
- Parameters:
username
- The username to validate.password
- The password to validate.authProfile
- The authentication profile to use.- Returns:
- true if the user is valid, false otherwise.
- Throws:
IllegalArgumentException
- if the provided auth profile doesn't exist.Exception
-
getUsername
-
getRoles
public static org.python.core.PyTuple getRoles()
-