@@ -6,6 +6,7 @@ import com.sap.cdc.android.sdk.auth.flow.LoginAuthFlow
66import com.sap.cdc.android.sdk.auth.flow.LogoutAuthFlow
77import com.sap.cdc.android.sdk.auth.flow.ProviderAuthFow
88import com.sap.cdc.android.sdk.auth.flow.RegistrationAuthFlow
9+ import com.sap.cdc.android.sdk.auth.flow.TFAAuthFlow
910import com.sap.cdc.android.sdk.auth.model.ConflictingAccountsEntity
1011import com.sap.cdc.android.sdk.auth.provider.IAuthenticationProvider
1112import com.sap.cdc.android.sdk.auth.session.Session
@@ -586,35 +587,35 @@ internal class AuthTFA(
586587) : IAuthTFA {
587588
588589 override suspend fun getProviders (regToken : String ): IAuthResponse {
589- val accountFlow = AccountAuthFlow (coreClient, sessionService)
590- return accountFlow .getTFAProviders(mutableMapOf (" regToken" to regToken))
590+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
591+ return tfaFlow .getTFAProviders(mutableMapOf (" regToken" to regToken))
591592 }
592593
593594 override suspend fun optInForPushAuthentication (): IAuthResponse {
594- val accountFlow = AccountAuthFlow (coreClient, sessionService)
595+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
595596 val parameters = mutableMapOf (
596597 " provider" to TFAProvider .PUSH .value, " mode" to " register"
597598 )
598- return accountFlow .optInForPushTFA(parameters = parameters)
599+ return tfaFlow .optInForPushTFA(parameters = parameters)
599600 }
600601
601602 override suspend fun finalizeOtpInForPushAuthentication (
602603 parameters : MutableMap <String , String >
603604 ): IAuthResponse {
604- val accountFlow = AccountAuthFlow (coreClient, sessionService)
605- return accountFlow .finalizeOptInForPushTFA(parameters)
605+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
606+ return tfaFlow .finalizeOptInForPushTFA(parameters)
606607 }
607608
608609 override suspend fun verifyPushTFA (parameters : MutableMap <String , String >): IAuthResponse {
609- val accountFlow = AccountAuthFlow (coreClient, sessionService)
610- return accountFlow .verifyPushTFA(parameters)
610+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
611+ return tfaFlow .verifyPushTFA(parameters)
611612 }
612613
613614 override suspend fun getRegisteredEmails (
614615 resolvableContext : ResolvableContext
615616 ): IAuthResponse {
616- val accountFlow = AccountAuthFlow (coreClient, sessionService)
617- return accountFlow .getRegisteredEmails(
617+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
618+ return tfaFlow .getRegisteredEmails(
618619 resolvableContext,
619620 mutableMapOf (" provider" to TFAProvider .EMAIL .value, " mode" to " verify" )
620621 )
@@ -625,8 +626,8 @@ internal class AuthTFA(
625626 emailAddress : String ,
626627 language : String?
627628 ): IAuthResponse {
628- val accountFlow = AccountAuthFlow (coreClient, sessionService)
629- return accountFlow .sendEmailCode(
629+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
630+ return tfaFlow .sendEmailCode(
630631 resolvableContext,
631632 mutableMapOf (" emailID" to emailAddress, " lang" to (language ? : " en" ))
632633 )
@@ -638,8 +639,8 @@ internal class AuthTFA(
638639 language : String? ,
639640 method : TFAPhoneMethod ?
640641 ): IAuthResponse {
641- val accountFlow = AccountAuthFlow (coreClient, sessionService)
642- return accountFlow .registerPhone(
642+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
643+ return tfaFlow .registerPhone(
643644 resolvableContext, phoneNumber,
644645 mutableMapOf (
645646 " provider" to TFAProvider .PHONE .value,
@@ -651,8 +652,8 @@ internal class AuthTFA(
651652 }
652653
653654 override suspend fun registerTOTP (resolvableContext : ResolvableContext ): IAuthResponse {
654- val accountFlow = AccountAuthFlow (coreClient, sessionService)
655- return accountFlow .registerTOTP(
655+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
656+ return tfaFlow .registerTOTP(
656657 resolvableContext, mutableMapOf (
657658 " provider" to TFAProvider .TOTP .value,
658659 " mode" to " register"
@@ -661,8 +662,8 @@ internal class AuthTFA(
661662 }
662663
663664 override suspend fun getRegisteredPhoneNumbers (resolvableContext : ResolvableContext ): IAuthResponse {
664- val accountFlow = AccountAuthFlow (coreClient, sessionService)
665- return accountFlow .getRegisteredPhoneNumbers(
665+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
666+ return tfaFlow .getRegisteredPhoneNumbers(
666667 resolvableContext, mutableMapOf (
667668 " provider" to TFAProvider .PHONE .value,
668669 " mode" to " verify"
@@ -676,8 +677,8 @@ internal class AuthTFA(
676677 method : TFAPhoneMethod ? ,
677678 language : String?
678679 ): IAuthResponse {
679- val accountFlow = AccountAuthFlow (coreClient, sessionService)
680- return accountFlow .sendPhoneCode(
680+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
681+ return tfaFlow .sendPhoneCode(
681682 resolvableContext, mutableMapOf (
682683 " lang" to (language ? : " en" ),
683684 " phoneID" to phoneId,
@@ -691,8 +692,8 @@ internal class AuthTFA(
691692 code : String ,
692693 rememberDevice : Boolean?
693694 ): IAuthResponse {
694- val accountFlow = AccountAuthFlow (coreClient, sessionService)
695- return accountFlow .verifyCode(
695+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
696+ return tfaFlow .verifyCode(
696697 resolvableContext,
697698 mutableMapOf (" code" to code),
698699 TFAProvider .EMAIL ,
@@ -705,8 +706,8 @@ internal class AuthTFA(
705706 code : String ,
706707 rememberDevice : Boolean?
707708 ): IAuthResponse {
708- val accountFlow = AccountAuthFlow (coreClient, sessionService)
709- return accountFlow .verifyCode(
709+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
710+ return tfaFlow .verifyCode(
710711 resolvableContext,
711712 mutableMapOf (" code" to code),
712713 TFAProvider .PHONE ,
@@ -719,8 +720,8 @@ internal class AuthTFA(
719720 code : String ,
720721 rememberDevice : Boolean?
721722 ): IAuthResponse {
722- val accountFlow = AccountAuthFlow (coreClient, sessionService)
723- return accountFlow .verifyCode(
723+ val tfaFlow = TFAAuthFlow (coreClient, sessionService)
724+ return tfaFlow .verifyCode(
724725 resolvableContext,
725726 mutableMapOf (" code" to code),
726727 TFAProvider .TOTP ,
0 commit comments