Class UserAuthenticatorUtils

    • Method Detail

      • getData

        public static char[] getData​(UserAuthenticationData data,
                                     UserAuthenticationData.Type type,
                                     char[] overriddenValue)
        Gets data of given type from the UserAuthenticationData or null if there is no data or data of this type available.
        Parameters:
        data - The UserAuthenticationData.
        type - The type of the element to retrieve.
        overriddenValue - The default value.
        Returns:
        The data of the given type as a character array or null if the data is not available.
      • authenticate

        public static UserAuthenticationData authenticate​(FileSystemOptions opts,
                                                          UserAuthenticationData.Type[] authenticatorTypes)
        Authenticates if there is an authenticator, else returns null.
        Parameters:
        opts - The FileSystemOptions.
        authenticatorTypes - An array of types describing the data to be retrieved.
        Returns:
        A UserAuthenticationData object containing the data requested.
      • authenticate

        public static UserAuthenticationData authenticate​(UserAuthenticator auth,
                                                          UserAuthenticationData.Type[] authenticatorTypes)
        Authenticates if there is an authenticator, else returns null.
        Parameters:
        auth - The UserAuthenticator.
        authenticatorTypes - An array of types describing the data to be retrieved.
        Returns:
        A UserAuthenticationData object containing the data requested.
      • toChar

        public static char[] toChar​(java.lang.String string)
        Converts a string to a char array (null-safe).
        Parameters:
        string - The String to convert.
        Returns:
        The character array.
      • cleanup

        public static void cleanup​(UserAuthenticationData authData)
        Cleans up the data in the UerAuthenticationData (null-safe).
        Parameters:
        authData - The UserAuthenticationDAta.
      • toString

        public static java.lang.String toString​(char[] data)
        Converts the given data to a string (null-safe).
        Parameters:
        data - A character array containing the data to convert to a String.
        Returns:
        The String.