Class UserManagementSubsystem

All Implemented Interfaces:
IConfigurableObject, INotScriptFriendly, ISupportsDeprecation, IDiffableObject, IAvatar, IEntityLifeCycleEvent, IPersistable, IServiceProvider, ITaggableObject, IDependencyScannableObject, IEntityDefinition, IPersistableObject<String>, IDesignTimeSecurable, IDesignTimeSecurableEntity, IRunTimeSecurable, IRunTimeSecurableEntity, ISecurable, IVisibilitySecurable, IVisibilitySecurableEntity, IAspectContainer, INamedObject, Serializable

@ThingworxExtensionApiClass(since={7,2,0}, canInstantiate=true) public class UserManagementSubsystem extends Subsystem
See Also:
  • Field Details

    • SESSION_TIMEOUT_SETTINGS

      public static final String SESSION_TIMEOUT_SETTINGS
      See Also:
    • LOGIN_SETTINGS

      public static final String LOGIN_SETTINGS
      See Also:
    • LOGIN_ATTEMPTS_MAX

      public static final String LOGIN_ATTEMPTS_MAX
      See Also:
    • LOGIN_ATTEMPTS_RESET_MINUTES

      public static final String LOGIN_ATTEMPTS_RESET_MINUTES
      See Also:
    • LOGIN_LOCKED_MINUTES

      public static final String LOGIN_LOCKED_MINUTES
      See Also:
    • PASSWORD_SYSTEM_DEFAULT_MIN_LENGTH

      public static final int PASSWORD_SYSTEM_DEFAULT_MIN_LENGTH
      See Also:
    • PASSWORD_ABSOLUTE_MIN_LENGTH

      public static final int PASSWORD_ABSOLUTE_MIN_LENGTH
      See Also:
    • PASSWORD_ABSOLUTE_MAX_LENGTH

      public static final int PASSWORD_ABSOLUTE_MAX_LENGTH
      See Also:
    • SYSTEM_BLACKLIST_FILE

      public static final String SYSTEM_BLACKLIST_FILE
      See Also:
    • PASSWORD_VALIDATION_REGEX

      public static final String PASSWORD_VALIDATION_REGEX
      See Also:
    • MIN_PASSWORD_HASH_SIZE

      public static final int MIN_PASSWORD_HASH_SIZE
      See Also:
    • DEFAULT_PASSWORD_HASH_SIZE

      public static final int DEFAULT_PASSWORD_HASH_SIZE
      See Also:
    • MIN_PASSWORD_SALT_SIZE

      public static final int MIN_PASSWORD_SALT_SIZE
      See Also:
    • DEFAULT_PASSWORD_SALT_SIZE

      public static final int DEFAULT_PASSWORD_SALT_SIZE
      See Also:
    • DEFAULT_THINGGROUP_VISIBILITY_PERM_DELEGATION_ENABLED

      public static final boolean DEFAULT_THINGGROUP_VISIBILITY_PERM_DELEGATION_ENABLED
      See Also:
    • DEFAULT_THINGGROUP_DIRECTPARENTS_CACHE_MAXSIZE

      public static final long DEFAULT_THINGGROUP_DIRECTPARENTS_CACHE_MAXSIZE
      See Also:
    • DEFAULT_THINGGROUP_DIRECTPARENTS_CACHE_CONCURRENCY_LEVEL

      public static final int DEFAULT_THINGGROUP_DIRECTPARENTS_CACHE_CONCURRENCY_LEVEL
      See Also:
    • DEFAULT_THINGGROUP_INHERITEDVISPERM_CACHE_MAXSIZE

      public static final long DEFAULT_THINGGROUP_INHERITEDVISPERM_CACHE_MAXSIZE
      See Also:
    • DEFAULT_THINGGROUP_INHERITEDVISPERM_CACHE_CONCURRENCY_LEVEL

      public static final int DEFAULT_THINGGROUP_INHERITEDVISPERM_CACHE_CONCURRENCY_LEVEL
      See Also:
    • _passwordConfigurableMinLength

      public Integer _passwordConfigurableMinLength
  • Constructor Details

    • UserManagementSubsystem

      public UserManagementSubsystem()
  • Method Details

    • Start

      @ThingworxExtensionApiMethod(since={7,2,0}) public void Start() throws Exception
      Service Category:
      Lifecycle
      Service Description:
      Starts the sub-system.
      Overrides:
      Start in class Subsystem
      Throws:
      Exception - If an error occurs

      This method is not supported by UserManagementSubsystem.
    • Stop

      @ThingworxExtensionApiMethod(since={7,2,0}) public void Stop() throws Exception
      Service Category:
      Lifecycle
      Service Description:
      Stops the sub-system.
      Overrides:
      Stop in class Subsystem
      Throws:
      Exception - If an error occurs

      This method is not supported by UserManagementSubsystem.
    • GetPlatformSessionTimeout

      @ThingworxExtensionApiMethod(since={7,2,0}) public Double GetPlatformSessionTimeout() throws Exception
      Service Category:
      Settings
      Service Description:
      Returns the login session timeout in minutes.
      Returns:
      timeout Session timeout in minutes - NUMBER
      Throws:
      Exception - If an error occurs
    • GetSessionShapes

      @ThingworxExtensionApiMethod(since={7,2,0}) public InfoTable GetSessionShapes() throws Exception
      Service Category:
      Sessions
      Service Description:
      Return a list of thing shapes assigned to user sessions.
      Returns:
      List of shapes in the User Session Shape list.
      Throws:
      Exception - If an error occurs

      Gets a list of ThingShapes in the User Session Shape list.
    • DeleteSessionShape

      @ThingworxExtensionApiMethod(since={7,2,0}) public void DeleteSessionShape(String name) throws Exception
      Service Category:
      Sessions
      Service Description:
      Deletes the specified thing shape from the list of those assigned as session shapes.


      Will remove a ThingShape with the given name from the User Session Shape list.
      Parameters:
      name - Name of the ThingShape to be removed
      Throws:
      Exception - If an unexpected error happens getting or persisting the User Session Shape list
    • AddSessionShape

      @ThingworxExtensionApiMethod(since={7,2,0}) public void AddSessionShape(String name) throws Exception
      Service Category:
      Sessions
      Service Description:
      Adds the specified thing shape to the list of those assigned as session shapes.


      Will add a ThingShape with the given name to the User Session Shape list.
      Parameters:
      name - Name of the ThingShape to be added
      Throws:
      Exception - if a ThingShape with the given name does not exist or an unexpected error happens getting or persisting the User Session Shape list
    • GetUserCount

      @ThingworxExtensionApiMethod(since={7,2,0}) public Integer GetUserCount() throws Exception
      Service Category:
      Entities
      Service Description:
      Return a count of users.
      Returns:
      a count of the users
      Throws:
      Exception - If an error occurs

      Gets a count of the Users in this ThingWorx Instance.
    • GetApplicationKeyExpirationInfo

      @ThingworxExtensionApiMethod(since={7,2,0}) public InfoTable GetApplicationKeyExpirationInfo(String userName, Boolean expiredKeys, Boolean unexpiredKeys) throws Exception
      Service Category:
      ApplicationKeys
      Service Description:
      Get application key information associated with the user specified. Must specify true to at least one parameter to return any application keys, true to both parameters if you want to return all application keys.


      Gets the Application Key expiration information for a given User.
      Parameters:
      userName - the user to check Application Key expiration information
      expiredKeys - true if results should include the expired AppKey information
      unexpiredKeys - true if results should include the Unexpired AppKey information
      Returns:
      List of the Application Keys associated with this user and their expiration information. Results returned in ApplicationKeyExpirationInfoCollection DataShape
      Throws:
      Exception - an unexpected error occurs
    • DoesApplicationKeyWithKeyIdExist

      @ThingworxExtensionApiMethod(since={7,2,0}) public Boolean DoesApplicationKeyWithKeyIdExist(String userName, String keyId) throws Exception
      Service Category:
      ApplicationKeys
      Service Description:
      Returns true if the specified key id associated with the user specified exists.
      Parameters:
      userName - Optional. The Username of the user that you want to check the App Key for.
      keyId - The application key to check for existence
      Returns:
      true if the Application Key exists
      Throws:
      Exception - If an error occurs

      Checks if an Application Key with the given ID exists and optionally, is associated with a given user. If no Username is specified, this will check if the Application Key exists, independent of which user it is associated with.
    • DeleteApplicationKeys

      @ThingworxExtensionApiMethod(since={6,6}) public void DeleteApplicationKeys(String userName, Boolean deleteExpiredKeys, Boolean deleteUnexpiredKeys) throws Exception
      Service Category:
      ApplicationKeys
      Service Description:
      Delete application keys associated with the user specified. Must specify true to at least one parameter to delete any application keys, true to both parameters if you want to delete all application keys.
      Parameters:
      userName - User name - USERNAME
      deleteExpiredKeys - Delete expired keys - BOOLEAN
      deleteUnexpiredKeys - Delete unexpired keys - BOOLEAN
      Throws:
      Exception - If an error occurs
    • IsUserServiceSelfBypass

      @ThingworxExtensionApiMethod(since={7,2,0}) public Boolean IsUserServiceSelfBypass() throws Exception
      Service Category:
      Settings
      Service Description:
      Returns whether users bypass permissions when accessing services on their own User entity.
      Returns:
      true is the Subsystem is configured for User Service Self Bypass
      Throws:
      Exception - If an error occurs

      Returns whether or not the Subsystem is configured to allow users to call services on their own User entity regardless of permissions. This is an Admin Only Service.
    • SetDefaultToHttpFormAuth

      @ThingworxExtensionApiMethod(since={7,4,8}) public void SetDefaultToHttpFormAuth(Boolean formAuth) throws Exception
      Service Category:
      Settings
      Service Description:
      Sets if unauthenticated users should get redirect to Form Login instead of Basic Auth challenge.
      Parameters:
      formAuth - When true, unauthenticated users will get redirected to Form Login - BOOLEAN
      Throws:
      Exception - If an error occurs
    • IsDefaultToHttpFormAuth

      @ThingworxExtensionApiMethod(since={7,4,8}) public Boolean IsDefaultToHttpFormAuth()
      Service Category:
      Settings
      Service Description:
      Returns setting for defaulting unauthenticated users to Form Login.


      Returns whether or not the Subsystem is configured to restrict concurrent user sessions. This is an Admin Only Service.
      Returns:
      true if the Subsystem is configured to restrict concurrent user sessions
    • SetRestrictConcurrentUserSessions

      @ThingworxExtensionApiMethod(since={7,4,8}) public void SetRestrictConcurrentUserSessions(Boolean restrict) throws Exception
      Service Category:
      Settings
      Service Description:
      Sets if should restrict the number of concurrent user sessions.
      Parameters:
      restrict - When true, users number of concurrent sessions will be restricted - BOOLEAN
      Throws:
      Exception - If an error occurs
    • GetRestrictConcurrentUserSessions

      @ThingworxExtensionApiMethod(since={7,4,8}) public Boolean GetRestrictConcurrentUserSessions() throws Exception
      Service Category:
      Settings
      Service Description:
      Returns whether concurrent user sessions are restricted.
      Returns:
      true if the Subsystem is configured to restrict concurrent user sessions
      Throws:
      Exception - If an error occurs

      Returns whether or not the Subsystem is configured to restrict concurrent user sessions. This is an Admin Only Service.