From 57c445efb5c8a473ad4d9496c6588a9b254dd826 Mon Sep 17 00:00:00 2001 From: TheJoKlLa Date: Wed, 22 Sep 2021 00:11:18 +0200 Subject: [PATCH] Added Authentication Session Agreement --- FabAccessAPI/Auth.cs | 1 - FabAccessAPI/Connection.cs | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/FabAccessAPI/Auth.cs b/FabAccessAPI/Auth.cs index 4639c87..6558b25 100644 --- a/FabAccessAPI/Auth.cs +++ b/FabAccessAPI/Auth.cs @@ -124,7 +124,6 @@ namespace FabAccessAPI public async Task Authenticate(string mech, Dictionary properties) { - var m = SaslFactory.Create(mech); foreach (KeyValuePair entry in properties) { diff --git a/FabAccessAPI/Connection.cs b/FabAccessAPI/Connection.cs index 98028db..fa47049 100644 --- a/FabAccessAPI/Connection.cs +++ b/FabAccessAPI/Connection.cs @@ -43,8 +43,12 @@ namespace FabAccessAPI public async Task Auth(string mech, Dictionary kvs, CancellationToken cancellationToken_ = default) { // _bootstrapCap = await _bootstrapCap.Unwrap(); - var authCap = await _bootstrapCap.AuthenticationSystem(cancellationToken_); - _auth = new Auth(authCap); + if(_auth == null) + { + var authCap = await _bootstrapCap.AuthenticationSystem(cancellationToken_); + _auth = new Auth(authCap); + } + var mechs = await _auth.GetMechanisms(); //_Log.Debug($"The Server supports the following auth mechs: {string.Join(", ", mechs)}");