Class HOTPAlgorithmService
java.lang.Object
io.jans.casa.plugins.authnmethod.service.otp.HOTPAlgorithmService
- All Implemented Interfaces:
IOTPAlgorithm
Created by jgomer on 2018-06-28.
An app. scoped bean that encapsulates logic related to generating and validating OTP keys.
See https://tools.ietf.org/html/rfc6238 and https://tools.ietf.org/html/rfc4226.
Migrated from com.lochbridge.oath to com.github.bastiaanjansen:otp-java.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]generateSecretKeyUri(byte[] secretKey, String displayName) getExternalUid(String secretKey, String code) voidinit(HOTPConfig conf, String issuer) validateKey(String secretKey, String otpCode, int movingFactor, Integer alternativeLookAheadWindow)
-
Constructor Details
-
HOTPAlgorithmService
public HOTPAlgorithmService()
-
-
Method Details
-
init
-
generateSecretKey
public byte[] generateSecretKey()- Specified by:
generateSecretKeyin interfaceIOTPAlgorithm
-
generateSecretKeyUri
- Specified by:
generateSecretKeyUriin interfaceIOTPAlgorithm
-
getExternalUid
- Specified by:
getExternalUidin interfaceIOTPAlgorithm
-
validateKey
-