Class LoginParser

java.lang.Object
com.fathzer.plugin.loader.utils.LoginParser

public abstract class LoginParser extends Object
A User:password login parser.
  • Method Details

    • fromString

      public static PasswordAuthentication fromString(String userAndPwd)
      Converts a user:pwd formatted string to a PasswordAuthentication login.
      Parameters:
      userAndPwd - The string. Its format should be user:pwd. pwd can be omitted.
      Returns:
      The login or null if the input String is empty or null
    • toString

      public static String toString(PasswordAuthentication login)
      Converts a PasswordAuthentication login to a String.
      The password is replaced by stars in the string.
      Parameters:
      login - The login.
      Returns:
      a String