Class ScramAttribute
- Namespace
- Ubiety.Scram.Core.Attributes
- Assembly
- Ubiety.Scram.Core.dll
Represents a SCRAM attribute used in the SCRAM authentication mechanism.
public class ScramAttribute
- Inheritance
-
ScramAttribute
- Derived
- Inherited Members
Constructors
ScramAttribute(char)
Initializes a new instance of the ScramAttribute class.
protected ScramAttribute(char name)
Parameters
namecharAttribute name.
Fields
AuthorizationIdentityName
Represents the attribute name for the authorization identity in the SCRAM authentication mechanism.
protected const char AuthorizationIdentityName = 'a'
Field Value
ChannelName
Represents the attribute name for the channel binding in the SCRAM authentication mechanism.
protected const char ChannelName = 'c'
Field Value
ClientProofName
Represents the attribute name for the client proof in the SCRAM authentication mechanism.
protected const char ClientProofName = 'p'
Field Value
ErrorName
Represents the attribute name used to indicate errors within the SCRAM authentication mechanism.
protected const char ErrorName = 'e'
Field Value
IterationsName
Represents the attribute name for the iteration count in the SCRAM authentication mechanism.
protected const char IterationsName = 'i'
Field Value
MessageName
Represents the attribute name for the message in the SCRAM authentication mechanism.
protected const char MessageName = 'm'
Field Value
NonceName
Represents the attribute name for the nonce used in the SCRAM authentication mechanism.
protected const char NonceName = 'r'
Field Value
SaltName
Represents the attribute name for the salt value used in the SCRAM authentication mechanism.
protected const char SaltName = 's'
Field Value
ServerSignatureName
Represents the attribute name for the server's signature in the SCRAM authentication mechanism.
protected const char ServerSignatureName = 'v'
Field Value
UserName
Represents the attribute name for the username in the SCRAM authentication mechanism.
protected const char UserName = 'n'
Field Value
Properties
Name
Gets the name of the SCRAM attribute.
protected char Name { get; }
Property Value
Methods
Parse(string)
Parses the provided attribute string into a specific type of ScramAttribute.
public static ScramAttribute Parse(string attribute)
Parameters
attributestringA string representation of the attribute in the format "key=value".
Returns
- ScramAttribute
An instance of the appropriate ScramAttribute type based on the key.
Exceptions
- FormatException
Thrown if the attribute string does not contain exactly one '=' or if the key portion of the string is not a single character.
ParseAll(string)
Parses a string of concatenated attributes and returns a collection of parsed attribute instances.
public static ICollection<ScramAttribute> ParseAll(string attributes)
Parameters
attributesstringThe string containing concatenated attribute values to parse.
Returns
- ICollection<ScramAttribute>
A collection of ScramAttribute objects representing the parsed attributes.
Exceptions
- FormatException
Thrown when the message is empty or an attribute is malformed.