Class OtpServiceImpl

  • All Implemented Interfaces:
    OtpService

    @Service
    public class OtpServiceImpl
    extends java.lang.Object
    implements OtpService
    • Constructor Summary

      Constructors 
      Constructor Description
      OtpServiceImpl​(org.molgenis.settings.AppSettings appSettings)  
    • Method Summary

      All Methods Instance Methods Concrete 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OtpServiceImpl

        public OtpServiceImpl​(org.molgenis.settings.AppSettings appSettings)
    • Method Detail

      • tryVerificationCode

        public boolean tryVerificationCode​(java.lang.String verificationCode,
                                           java.lang.String secretKey)
        Description copied from interface: OtpService
        Use TOTP algorithm to verify validity of secret and verification code.
        Specified by:
        tryVerificationCode in interface OtpService
        Parameters:
        verificationCode - given verificationCode
        secretKey - generated secret key
        Returns:
        vericifcationCode matches secret key
      • getAuthenticatorURI

        public java.lang.String getAuthenticatorURI​(java.lang.String secretKey)
        Description copied from interface: OtpService
        Generate URI for use in authenticator apps
        Specified by:
        getAuthenticatorURI in interface OtpService
        Returns:
        Google Authenticator URI