Package org.wiremock.url
Interface Password
- All Superinterfaces:
Normalisable<Password>,org.wiremock.stringparser.ParsedString,PercentEncoded<Password>
Represents the password portion of user information in a URI authority.
The password is the part after the colon in user information (username:password).
Passwords may contain percent-encoded characters.
Security Warning: Including passwords in URIs is strongly discouraged as they may be logged, cached, or exposed in various ways. This interface is provided for compatibility with legacy systems only.
Implementations must be immutable and thread-safe.
- See Also:
-
Method Summary
Static MethodsMethods inherited from interface org.wiremock.url.Normalisable
isNormalForm, normaliseMethods inherited from interface org.wiremock.stringparser.ParsedString
toStringMethods inherited from interface org.wiremock.url.PercentEncoded
decode, isEmpty, length
-
Method Details
-
parse
Parses a string into a password.- Parameters:
password- the string to parse- Returns:
- the parsed password
- Throws:
IllegalPassword- if the string is not a valid password
-
encode
Encodes a string into a valid password with proper percent-encoding.- Parameters:
unencoded- the unencoded string- Returns:
- the encoded password
-