Class UserManagementSubsystem

    • Field Detail

      • SESSION_TIMEOUT_SETTINGS

        public static final java.lang.String SESSION_TIMEOUT_SETTINGS
        See Also:
        Constant Field Values
      • LOGIN_ATTEMPTS_MAX

        public static final java.lang.String LOGIN_ATTEMPTS_MAX
        See Also:
        Constant Field Values
      • LOGIN_ATTEMPTS_RESET_MINUTES

        public static final java.lang.String LOGIN_ATTEMPTS_RESET_MINUTES
        See Also:
        Constant Field Values
      • LOGIN_LOCKED_MINUTES

        public static final java.lang.String LOGIN_LOCKED_MINUTES
        See Also:
        Constant Field Values
      • PASSWORD_SYSTEM_DEFAULT_MIN_LENGTH

        public static final int PASSWORD_SYSTEM_DEFAULT_MIN_LENGTH
        See Also:
        Constant Field Values
      • PASSWORD_ABSOLUTE_MIN_LENGTH

        public static final int PASSWORD_ABSOLUTE_MIN_LENGTH
        See Also:
        Constant Field Values
      • PASSWORD_ABSOLUTE_MAX_LENGTH

        public static final int PASSWORD_ABSOLUTE_MAX_LENGTH
        See Also:
        Constant Field Values
      • SYSTEM_BLACKLIST_FILE

        public static final java.lang.String SYSTEM_BLACKLIST_FILE
        See Also:
        Constant Field Values
      • DEFAULT_PASSWORD_HASH_SIZE

        public static final int DEFAULT_PASSWORD_HASH_SIZE
        See Also:
        Constant Field Values
      • DEFAULT_PASSWORD_SALT_SIZE

        public static final int DEFAULT_PASSWORD_SALT_SIZE
        See Also:
        Constant Field Values
      • DEFAULT_THINGGROUP_VISIBILITY_PERM_DELEGATION_ENABLED

        public static final boolean DEFAULT_THINGGROUP_VISIBILITY_PERM_DELEGATION_ENABLED
        See Also:
        Constant Field Values
      • DEFAULT_THINGGROUP_DIRECTPARENTS_CACHE_MAXSIZE

        public static final long DEFAULT_THINGGROUP_DIRECTPARENTS_CACHE_MAXSIZE
        See Also:
        Constant Field Values
      • DEFAULT_THINGGROUP_DIRECTPARENTS_CACHE_CONCURRENCY_LEVEL

        public static final int DEFAULT_THINGGROUP_DIRECTPARENTS_CACHE_CONCURRENCY_LEVEL
        See Also:
        Constant Field Values
      • DEFAULT_THINGGROUP_INHERITEDVISPERM_CACHE_MAXSIZE

        public static final long DEFAULT_THINGGROUP_INHERITEDVISPERM_CACHE_MAXSIZE
        See Also:
        Constant Field Values
      • DEFAULT_THINGGROUP_INHERITEDVISPERM_CACHE_CONCURRENCY_LEVEL

        public static final int DEFAULT_THINGGROUP_INHERITEDVISPERM_CACHE_CONCURRENCY_LEVEL
        See Also:
        Constant Field Values
      • _passwordConfigurableMinLength

        public java.lang.Integer _passwordConfigurableMinLength
    • Constructor Detail

      • UserManagementSubsystem

        public UserManagementSubsystem()
    • Method Detail

      • Start

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

        This method is not supported by UserManagementSubsystem.
      • Stop

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

        This method is not supported by UserManagementSubsystem.
      • GetPlatformSessionTimeout

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

        @ThingworxExtensionApiMethod(since={7,2,0})
        public InfoTable GetSessionShapes()
                                   throws java.lang.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:
        java.lang.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​(java.lang.String name)
                                throws java.lang.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:
        java.lang.Exception - If an unexpected error happens getting or persisting the User Session Shape list
      • AddSessionShape

        @ThingworxExtensionApiMethod(since={7,2,0})
        public void AddSessionShape​(java.lang.String name)
                             throws java.lang.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:
        java.lang.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 java.lang.Integer GetUserCount()
                                       throws java.lang.Exception
        Service Category:
        Entities
        Service Description:
        Return a count of users.
        Returns:
        a count of the users
        Throws:
        java.lang.Exception - If an error occurs

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

        @ThingworxExtensionApiMethod(since={7,2,0})
        public InfoTable GetApplicationKeyExpirationInfo​(java.lang.String userName,
                                                         java.lang.Boolean expiredKeys,
                                                         java.lang.Boolean unexpiredKeys)
                                                  throws java.lang.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:
        java.lang.Exception - an unexpected error occurs
      • DoesApplicationKeyWithKeyIdExist

        @ThingworxExtensionApiMethod(since={7,2,0})
        public java.lang.Boolean DoesApplicationKeyWithKeyIdExist​(java.lang.String userName,
                                                                  java.lang.String keyId)
                                                           throws java.lang.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:
        java.lang.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​(java.lang.String userName,
                                          java.lang.Boolean deleteExpiredKeys,
                                          java.lang.Boolean deleteUnexpiredKeys)
                                   throws java.lang.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:
        java.lang.Exception - If an error occurs
      • IsUserServiceSelfBypass

        @ThingworxExtensionApiMethod(since={7,2,0})
        public java.lang.Boolean IsUserServiceSelfBypass()
                                                  throws java.lang.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:
        java.lang.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​(java.lang.Boolean formAuth)
                                      throws java.lang.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:
        java.lang.Exception - If an error occurs
      • IsDefaultToHttpFormAuth

        @ThingworxExtensionApiMethod(since={7,4,8})
        public java.lang.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​(java.lang.Boolean restrict)
                                               throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetRestrictConcurrentUserSessions

        @ThingworxExtensionApiMethod(since={7,4,8})
        public java.lang.Boolean GetRestrictConcurrentUserSessions()
                                                            throws java.lang.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:
        java.lang.Exception - If an error occurs

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