Skip to content

Commit

Permalink
refactor enroll method
Browse files Browse the repository at this point in the history
  • Loading branch information
mrFlick72 committed Jul 21, 2024
1 parent 528b64c commit 578c19a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ class MfaMethodsEnrollmentAssociation(

class MfaMethodsEnrollment(
private val verificationTicketFactory: VerificationTicketFactory,
mfaSender: OtpMfaSender,
private val mfaSender: OtpMfaSender,
) {

fun enroll(
account: Account,
emailMfaMethod: MfaMethod,
clientAppId: ClientAppId,
sendChallengeCode : Boolean = true
sendChallengeCode: Boolean = true
): VerificationTicket {
if (sendChallengeCode) {
mfaSender.sendMfaChallenge(account.email)
}
return verificationTicketFactory.createTicketFor(account, clientAppId)
}
}

0 comments on commit 578c19a

Please sign in to comment.