Class TotpDtoMapper
java.lang.Object
com.irurueta.authserver.authorization.api.web.totp.TotpDtoMapper
Maps the results of the authenticator app and recovery code use cases onto the DTOs generated from the contract.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoEnrollmentResponse(String otpauthUri, String qrCode) Maps a pending enrolment.toRecoveryCodesResponse(List<String> codes) Maps a freshly generated set of recovery codes; all of them are unused.
-
Constructor Details
-
TotpDtoMapper
public TotpDtoMapper()
-
-
Method Details
-
toEnrollmentResponse
Maps a pending enrolment.- Parameters:
otpauthUri- theotpauth://URI that carries the secret.qrCode- the URI as a QR code, in adata:URI.- Returns:
- the answer to the enrolment.
-
toRecoveryCodesResponse
Maps a freshly generated set of recovery codes; all of them are unused.- Parameters:
codes- the codes in clear text.- Returns:
- the answer, whose
remainingis the size of the set.
-