CraAuthentication class
This is the WAMPCRA authentication implementation for this package. Use it with the Client.
- Inheritance
-
- Object
- AbstractAuthentication
- CraAuthentication
Constructors
- CraAuthentication(String secret)
-
Initializes the authentication method with the
secretaka password
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onChallenge
→ Stream<
Extra> -
When the challenge starts the stream will provide the current Extra in
case the client needs some additional information to challenge the server.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secret ↔ String
-
getter/setter pair
Methods
-
challenge(
Extra extra) → Future< Authenticate> -
This method is called by the session if the router returns the challenge or
the challenges
extrarespectively. This method proceeds the cra authentication process and creates an authentication message according to the wamp specificationoverride -
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
detailsfor a givenrealm. Since CRA does not need to modify it. This method returns a completed futureoverride -
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,keylenandhmacLength. -
encodeByteHmac(
Uint8List key, int keylen, List< int> challenge, {dynamic hmacLength = 64}) → Uint8List -
Creates a hmac from a
keythat usually is the derived key,keylen,challengeandhmacLength. -
encodeHmac(
Uint8List key, int keylen, List< int> challenge, {dynamic hmacLength = 64}) → String -
Creates an base 64 encoded hmac from a
keythat usually is the derived key,keylen,challengeandhmacLength.
Constants
- defaultIterations → const int
- defaultKeyLength → const int
-
defaultKeySalt
→ const List<
int>