@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public abstract class AuthenticationUtilities extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static SecurityMonitorThing |
_securityMonitorThing |
static java.lang.String |
AUTHENTICATION_FAILED |
static java.lang.String |
THINGWORX_SSO_AUTHENTICATOR_EXCEPTION |
static java.lang.String |
THINGWORX_SSO_AUTHENTICATOR_EXCEPTION_RECOVERABLE |
Constructor and Description |
---|
AuthenticationUtilities() |
Modifier and Type | Method and Description |
---|---|
static SecurityMonitorThing |
getSecurityMonitorThing() |
static void |
handleLogout(javax.servlet.http.HttpServletRequest httpRequest) |
static boolean |
matchesLogoutRequest(javax.servlet.http.HttpServletRequest httpRequest) |
static void |
redirectToMain(javax.servlet.http.HttpServletResponse httpResponse) |
static void |
validateCredentials(java.lang.String user,
java.lang.String password) |
static void |
validateCredentials(java.lang.String userName,
java.lang.String password,
javax.servlet.http.HttpServletRequest req) |
static User |
validateEnabledThingworxUser(java.lang.String userName)
Deprecated.
|
static User |
validateThingworxUser(java.lang.String userName)
Validates the userName parameter specified. |
public static final java.lang.String THINGWORX_SSO_AUTHENTICATOR_EXCEPTION
public static final java.lang.String THINGWORX_SSO_AUTHENTICATOR_EXCEPTION_RECOVERABLE
public static SecurityMonitorThing _securityMonitorThing
public static final java.lang.String AUTHENTICATION_FAILED
@ThingworxExtensionApiMethod(since={6,6}) public static SecurityMonitorThing getSecurityMonitorThing()
@ThingworxExtensionApiMethod(since={6,6}) public static boolean matchesLogoutRequest(javax.servlet.http.HttpServletRequest httpRequest)
@ThingworxExtensionApiMethod(since={6,6}) public static void handleLogout(javax.servlet.http.HttpServletRequest httpRequest)
@ThingworxExtensionApiMethod(since={6,6}) public static void validateCredentials(java.lang.String user, java.lang.String password) throws AuthenticatorException
AuthenticatorException
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public static void validateCredentials(java.lang.String userName, java.lang.String password, javax.servlet.http.HttpServletRequest req) throws AuthenticatorException
AuthenticatorException
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public static User validateThingworxUser(java.lang.String userName) throws AuthenticatorException
User
is valid if it exists, if it is enabled, if it is not locked. The user and
its password are not verified/validated against a external Directory Service, if one is configured. The user is only validated
against the User state data (exception password) contained within Thingworx. This method is most useful in CustomAuthenticator
implementations that want to validate the User state data within Thingworx, but validate the password externally, for instance in an
IDP.userName
- The name of the User
User
AuthenticatorException
- If the user is not valid this exception is thrown containing an
InvalidRequestException
. The
InvalidRequestException
contains a failed authentication message and a
unauthorized status code@Deprecated @ThingworxExtensionApiMethod(since={6,6}) public static User validateEnabledThingworxUser(java.lang.String userName) throws AuthenticatorException
validateThingworxUser(String)
userName
- Name of the User
.User
AuthenticatorException
- If an error occurs.@ThingworxExtensionApiMethod(since={6,6}) public static void redirectToMain(javax.servlet.http.HttpServletResponse httpResponse) throws java.io.IOException
java.io.IOException
- If an error occurs