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 Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getAuthenticatorURI​(java.lang.String secretKey)
      Generate URI for use in authenticator apps
      boolean tryVerificationCode​(java.lang.String verificationCode, java.lang.String secretKey)
      Use TOTP algorithm to verify validity of secret and verification code.
    • Method Detail

      • tryVerificationCode

        boolean tryVerificationCode​(java.lang.String verificationCode,
                                    java.lang.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

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