Added Authentication Session Agreement

This commit is contained in:
TheJoKlLa 2021-09-22 00:11:18 +02:00
parent fb4122c5a6
commit 57c445efb5
2 changed files with 6 additions and 3 deletions

View File

@ -124,7 +124,6 @@ namespace FabAccessAPI
public async Task<bool> Authenticate(string mech, Dictionary<string, object> properties) public async Task<bool> Authenticate(string mech, Dictionary<string, object> properties)
{ {
var m = SaslFactory.Create(mech); var m = SaslFactory.Create(mech);
foreach (KeyValuePair<string, object> entry in properties) foreach (KeyValuePair<string, object> entry in properties)
{ {

View File

@ -43,8 +43,12 @@ namespace FabAccessAPI
public async Task<bool> Auth(string mech, Dictionary<string, object> kvs, CancellationToken cancellationToken_ = default) public async Task<bool> Auth(string mech, Dictionary<string, object> kvs, CancellationToken cancellationToken_ = default)
{ {
// _bootstrapCap = await _bootstrapCap.Unwrap(); // _bootstrapCap = await _bootstrapCap.Unwrap();
var authCap = await _bootstrapCap.AuthenticationSystem(cancellationToken_); if(_auth == null)
_auth = new Auth(authCap); {
var authCap = await _bootstrapCap.AuthenticationSystem(cancellationToken_);
_auth = new Auth(authCap);
}
var mechs = await _auth.GetMechanisms(); var mechs = await _auth.GetMechanisms();
//_Log.Debug($"The Server supports the following auth mechs: {string.Join(", ", mechs)}"); //_Log.Debug($"The Server supports the following auth mechs: {string.Join(", ", mechs)}");