Interface OtpService

  • All Known Implementing Classes:
    OtpServiceImpl

    public interface OtpService
    OTPService is used to determine if the UserSecret matches the given validationcode.

    The base is the TOTP algorithm. We have included a thirdparty library which serves the code for the validity check

    • Method Detail

      • tryVerificationCode

        boolean tryVerificationCode​(String verificationCode,
                                    String secretKey)
        Use TOTP algorithm to verify validity of secret and verification code.
        Parameters:
        verificationCode - given verificationCode
        secretKey - generated secret key
        Returns:
        vericifcationCode matches secret key
      • getAuthenticatorURI

        String getAuthenticatorURI​(String secretKey)
        Generate URI for use in authenticator apps
        Returns:
        Google Authenticator URI