Class ServerFinalMessage
Represents the final message sent by the server in the SCRAM authentication process.
public class ServerFinalMessage
- Inheritance
-
ServerFinalMessage
- Inherited Members
Constructors
ServerFinalMessage(ServerSignatureAttribute)
Initializes a new instance of the ServerFinalMessage class.
public ServerFinalMessage(ServerSignatureAttribute serverSignature)
Parameters
serverSignatureServerSignatureAttributeServer signature.
Properties
ServerSignature
Gets the server's computed signature during the SCRAM authentication process.
public ServerSignatureAttribute? ServerSignature { get; }
Property Value
Remarks
The ServerSignature ensures the integrity of the authentication handshake
by verifying that the server knows the user's credentials without explicitly exposing them.
Methods
Parse(string)
Parses a server final message string into a ServerFinalMessage object.
public static ServerFinalMessage Parse(string message)
Parameters
messagestringThe server final message string to parse.
Returns
- ServerFinalMessage
An instance of ServerFinalMessage parsed from the provided message.
Exceptions
- MessageParseException
Thrown when the message cannot be parsed.
TryParse(string, out ServerFinalMessage)
Tries to parse a server final message from the given string.
public static bool TryParse(string message, out ServerFinalMessage finalMessage)
Parameters
messagestringThe message string to parse.
finalMessageServerFinalMessageThe resulting ServerFinalMessage instance if parsing is successful.
Returns
- bool
true if the parsing is successful; otherwise, false.
Operators
implicit operator ServerFinalMessage(byte[])
Implicitly converts a byte array to a ServerFinalMessage instance.
public static implicit operator ServerFinalMessage(byte[] message)
Parameters
messagebyte[]The byte array containing the UTF-8 encoded message to convert.
Returns
- ServerFinalMessage
A new ServerFinalMessage instance parsed from the byte array.
Exceptions
- MessageParseException
Thrown when the message cannot be parsed.
implicit operator ServerFinalMessage(string)
Implicitly converts a string to a ServerFinalMessage instance.
public static implicit operator ServerFinalMessage(string message)
Parameters
messagestringThe string message to convert.
Returns
- ServerFinalMessage
A new ServerFinalMessage instance parsed from the string.
Exceptions
- MessageParseException
Thrown when the message cannot be parsed.