feat: Implement cancel uiarequest

This commit is contained in:
Christian Pauly 2021-02-10 13:33:01 +01:00
parent 9fa36f736b
commit fd05f642d8
1 changed files with 6 additions and 0 deletions

View File

@ -88,6 +88,12 @@ class UiaRequest<T> {
Future<T> completeStage(AuthenticationData auth) => _run(auth);
/// Cancel this uia request for example if the app can not handle this stage.
void cancel([Exception err]) {
error = err ?? Exception('Request has been canceled');
state = UiaRequestState.fail;
}
Set<String> getNextStages(
List<AuthenticationFlow> flows, List<String> completed) {
final nextStages = <String>{};