Class UserAttribute
- Namespace
- Ubiety.Scram.Core.Attributes
- Assembly
- Ubiety.Scram.Core.dll
Represents a SCRAM user attribute with specific formatting and escaping rules.
public class UserAttribute : ScramAttribute<string>
- Inheritance
-
UserAttribute
- Inherited Members
Constructors
UserAttribute(string, bool)
Initializes a new instance of the UserAttribute class.
public UserAttribute(string value, bool fromWire = false)
Parameters
valuestringString value of the username.
fromWireboolIndicates if the value is escaped from the server.
Exceptions
- FormatException
Thrown when
fromWireistrueand the value is not a valid escaped, SASLprep'd username.- ProhibitedValueException
Thrown when
fromWireisfalseand the username contains a character SASLprep prohibits.- BidirectionalFormatException
Thrown when
fromWireisfalseand the username mixes text directions in a way SASLprep forbids.
Methods
ToString()
Converts the current instance of UserAttribute to its string representation.
public override string ToString()
Returns
- string
A string representation of the UserAttribute, where the value is encoded by replacing specific characters ("=" and ",") with their respective replacements.