authenticationFlows property

List<AuthenticationFlow>? get authenticationFlows

For each endpoint, a server offers one or more 'flows' that the client can use to authenticate itself. Each flow comprises a series of stages. If this request doesn't need additional authentication, then this is null.

Implementation

List<AuthenticationFlow>? get authenticationFlows => raw
    .tryGet<List<Object?>>('flows')
    ?.whereType<Map<String, Object?>>()
    .map((flow) => flow['stages'])
    .whereType<List<Object?>>()
    .map(
      (stages) =>
          AuthenticationFlow(List<String>.from(stages.whereType<String>())),
    )
    .toList();