CraAuthentication class

This is the WAMPCRA authentication implementation for this package. Use it with the Client.

Inheritance

Constructors

CraAuthentication(String secret)
Initializes the authentication method with the secret aka password

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secret String
final

Methods

challenge(Extra? extra) Future<Authenticate>
This method is called by the session if the router returns the challenge or the challenges extra respectively. This method proceeds the cra authentication process and creates an authentication message according to the wamp specification
override
getName() String
This method is called by the session to identify the authentication name.
override
hello(String? realm, Details details) Future<void>
This method is called by the session to modify the hello details for a given realm. Since CRA does not need to modify it. This method returns a completed future
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

deriveKey(String secret, List<int> salt, {int iterations = defaultIterations, int keylen = defaultKeyLength, dynamic hmacLength = 64}) Uint8List
Creates an derived key from a secret, salt, iterations, keylen and hmacLength.
encodeByteHmac(Uint8List key, int keylen, List<int> challenge, {dynamic hmacLength = 64}) Uint8List
Creates a hmac from a key that usually is the derived key, keylen, challenge and hmacLength.
encodeHmac(Uint8List key, int keylen, List<int> challenge, {dynamic hmacLength = 64}) String
Creates an base 64 encoded hmac from a key that usually is the derived key, keylen, challenge and hmacLength.

Constants

defaultIterations → const int
defaultKeyLength → const int
defaultKeySalt → const List<int>