Table of Contents

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

value string

String value of the username.

fromWire bool

Indicates if the value is escaped from the server.

Exceptions

FormatException

Thrown when fromWire is true and the value is not a valid escaped, SASLprep'd username.

ProhibitedValueException

Thrown when fromWire is false and the username contains a character SASLprep prohibits.

BidirectionalFormatException

Thrown when fromWire is false and 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.