Add registration terms screen. (#6128)

Begin implementing Auth Terms coordinator.
This commit is contained in:
Doug
2022-05-10 22:34:35 +01:00
committed by GitHub
parent 290d84ce4f
commit 5366489483
19 changed files with 722 additions and 4 deletions
@@ -134,7 +134,7 @@ struct FlowResult {
case dummy(mandatory: Bool)
/// The stage with the type `m.login.terms`.
case terms(mandatory: Bool, policies: [String: String])
case terms(mandatory: Bool, policies: [AnyHashable: Any])
/// A stage of an unknown type.
case other(mandatory: Bool, type: String, params: [AnyHashable: Any])
@@ -166,7 +166,7 @@ extension MXAuthenticationSession {
case kMXLoginFlowTypeDummy:
stage = .dummy(mandatory: isMandatory)
case kMXLoginFlowTypeTerms:
let parameters = params[flow] as? [String: String]
let parameters = params[flow] as? [AnyHashable: Any]
stage = .terms(mandatory: isMandatory, policies: parameters ?? [:])
case kMXLoginFlowTypeMSISDN:
stage = .msisdn(mandatory: isMandatory)