Skip to content

Commit

Permalink
update dependencies. update version. added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
konsultaner committed Sep 7, 2024
1 parent ca22bdd commit 605ea7e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 2.2.1

- added `ScamAuthentication#clientKey`, `ScamAuthentication.fromClientKey` and a `_reuseClientKey` option to the
constructors to reuse the client key for authentication to save computation time.

### 2.2.0

- updated min sdk version to 3.4.0
Expand Down
9 changes: 7 additions & 2 deletions lib/src/authentication/scram_authentication.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ class ScramAuthentication extends AbstractAuthentication {
}

/// Initialized the instance with the [secret] and an optional [challengeTimeout]
/// which will cause the authentication process to fail if the server responce took
/// too long
/// which will cause the authentication process to fail if the server response took
/// too long. The [reuseClientKey] option will compute the client key only for
/// the first time. The second time stored client key is used
ScramAuthentication(String secret,
{Duration? challengeTimeout, bool reuseClientKey = false}) {
if (challengeTimeout != null) {
Expand All @@ -53,6 +54,10 @@ class ScramAuthentication extends AbstractAuthentication {
_secret = Saslprep.saslprep(secret);
}

/// If the client key was stored, use this named constructor with the stored
/// [clientKey] instead. This will save computation time.
/// The optional [challengeTimeout] will cause the authentication process to
/// fail if the server response took too long.
ScramAuthentication.fromClientKey(Uint8List clientKey,
{Duration? challengeTimeout}) {
if (challengeTimeout != null) {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: connectanum
homepage: https://github.com/konsultaner/connectanum-dart
version: 2.2.0
version: 2.2.1
description: >-
This is a WAMP client (Web Application Messaging Protocol) implementation for the dart language and flutter projects.
dependencies:
Expand All @@ -11,7 +11,7 @@ dependencies:
meta: ^1.15.0
msgpack_dart: ^1.0.0
cbor: ^6.2.0
web: ^0.5.0
web: ^1.0.0
dev_dependencies:
test: ^1.25.5
stream_channel: 2.1.2
Expand Down

0 comments on commit 605ea7e

Please sign in to comment.