Table of Contents

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

name char

Attribute name.

Fields

AuthorizationIdentityName

Represents the attribute name for the authorization identity in the SCRAM authentication mechanism.

protected const char AuthorizationIdentityName = 'a'

Field Value

char

ChannelName

Represents the attribute name for the channel binding in the SCRAM authentication mechanism.

protected const char ChannelName = 'c'

Field Value

char

ClientProofName

Represents the attribute name for the client proof in the SCRAM authentication mechanism.

protected const char ClientProofName = 'p'

Field Value

char

ErrorName

Represents the attribute name used to indicate errors within the SCRAM authentication mechanism.

protected const char ErrorName = 'e'

Field Value

char

IterationsName

Represents the attribute name for the iteration count in the SCRAM authentication mechanism.

protected const char IterationsName = 'i'

Field Value

char

MessageName

Represents the attribute name for the message in the SCRAM authentication mechanism.

protected const char MessageName = 'm'

Field Value

char

NonceName

Represents the attribute name for the nonce used in the SCRAM authentication mechanism.

protected const char NonceName = 'r'

Field Value

char

SaltName

Represents the attribute name for the salt value used in the SCRAM authentication mechanism.

protected const char SaltName = 's'

Field Value

char

ServerSignatureName

Represents the attribute name for the server's signature in the SCRAM authentication mechanism.

protected const char ServerSignatureName = 'v'

Field Value

char

UserName

Represents the attribute name for the username in the SCRAM authentication mechanism.

protected const char UserName = 'n'

Field Value

char

Properties

Name

Gets the name of the SCRAM attribute.

protected char Name { get; }

Property Value

char

Methods

Parse(string)

Parses the provided attribute string into a specific type of ScramAttribute.

public static ScramAttribute Parse(string attribute)

Parameters

attribute string

A 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

attributes string

The 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.