Class UserAuthenticatorUtils

java.lang.Object
org.apache.commons.vfs2.util.UserAuthenticatorUtils

public final class UserAuthenticatorUtils extends Object
Helps with authentication.
  • Method Details

    • authenticate

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

      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.
    • cleanup

      public static void cleanup(UserAuthenticationData authData)
      Cleans up the data in the UerAuthenticationData (null-safe).
      Parameters:
      authData - The UserAuthenticationDAta.
    • 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.
    • toChar

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

      public static 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.