More Usebility

This commit is contained in:
TheJoKlLa
2021-09-21 23:59:14 +02:00
parent 4822373d28
commit 0c5bf80654
7 changed files with 40 additions and 19 deletions

View File

@ -40,10 +40,10 @@ namespace FabAccessAPI
/// <param name="mech">The desired authentication mechanism</param>
/// <param name="kvs">Key-Value data specific to the mechanism</param>
/// <returns></returns>
public async Task 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();
var authCap = await _bootstrapCap.AuthenticationSystem(cancellationToken_).ConfigureAwait(false);
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)}");
@ -53,7 +53,7 @@ namespace FabAccessAPI
throw new UnsupportedMechanismException();
}
await _auth.Authenticate(mech, kvs);
return await _auth.Authenticate(mech, kvs);
}
/// <summary>