Package com.fathzer.plugin.loader.utils
Class LoginParser
java.lang.Object
com.fathzer.plugin.loader.utils.LoginParser
A User:password login parser.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PasswordAuthenticationfromString(String userAndPwd) Converts a user:pwd formatted string to a PasswordAuthentication login.static StringtoString(PasswordAuthentication login) Converts a PasswordAuthentication login to a String.
-
Method Details
-
fromString
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
Converts a PasswordAuthentication login to a String.
The password is replaced by stars in the string.- Parameters:
login- The login.- Returns:
- a String
-