Class UserInteractiveAuth
Runs user-interactive auth: sessions of completed stages, kept in memory for a short while.
Inherited Members
Namespace: Uniform.Matrix.Server.Accounts
Assembly: Uniform.Matrix.Server.dll
Syntax
public sealed class UserInteractiveAuth
Constructors
| Edit this page View SourceUserInteractiveAuth(TimeProvider)
Use time to expire sessions.
Declaration
public UserInteractiveAuth(TimeProvider time)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeProvider | time |
Methods
| Edit this page View SourceAuthenticateAsync(JsonObject?, IReadOnlyList<IReadOnlyList<string>>, Func<string, JsonObject, CancellationToken, Task<bool>>, IReadOnlyDictionary<string, JsonObject>?, CancellationToken)
Complete the stage in auth, and return once a flow is complete; otherwise throws AuthenticationRequiredException.
Declaration
public Task AuthenticateAsync(JsonObject? auth, IReadOnlyList<IReadOnlyList<string>> flows, Func<string, JsonObject, CancellationToken, Task<bool>> checkStage, IReadOnlyDictionary<string, JsonObject>? parameters, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonObject | auth | The request's |
| IReadOnlyList<IReadOnlyList<string>> | flows | Accepted stage combinations. |
| Func<string, JsonObject, CancellationToken, Task<bool>> | checkStage | Returns whether the stage of the given type is passed by the |
| IReadOnlyDictionary<string, JsonObject> | parameters | Parameters of stages by type, e.g. the policies of Terms; null for none. |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |