Packages

class GoogleTotpProvider extends Provider with ExecutionContextProvider with api.Logger

Google's TOTP authentication concrete provider implementation.

Linear Supertypes
api.Logger, ExecutionContextProvider, Provider, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GoogleTotpProvider
  2. Logger
  3. ExecutionContextProvider
  4. Provider
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new GoogleTotpProvider(injectedPasswordHasherRegistry: PasswordHasherRegistry)(implicit executionContext: ExecutionContext)

    injectedPasswordHasherRegistry

    used to hash the scratch (or recovery) codes.

    executionContext

    the execution context.

    Annotations
    @Inject()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def authenticate(totpInfo: GoogleTotpInfo, plainScratchCode: String): Future[Option[(PasswordInfo, GoogleTotpInfo)]]

    Authenticate the user using a TOTP scratch (or recovery) code.

    Authenticate the user using a TOTP scratch (or recovery) code. This method will check each of the previously hashed scratch codes and find the first one that matches the one entered by the user. The one found is removed from totpInfo and returned for easy client-side bookkeeping.

    totpInfo

    The original TOTP info containing the hashed scratch codes.

    plainScratchCode

    The plain scratch code entered by the user.

    returns

    Some tuple consisting of (PasswordInfo, TotpInfo) if the authentication was successful, None otherwise.

  6. def authenticate(sharedKey: String, verificationCode: String): Future[Option[LoginInfo]]

    Returns some login info when the TOTP authentication with verification code was successful, None otherwise.

    Returns some login info when the TOTP authentication with verification code was successful, None otherwise.

    sharedKey

    A unique key which identifies a user on this provider (userID, email, ...).

    verificationCode

    the verification code generated using TOTP.

    returns

    Some login info if the authentication was successful, None otherwise.

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  8. def createCredentials(accountName: String, issuer: Option[String] = None): GoogleTotpCredentials

    Returns the generated TOTP credentials including the shared key along with hashed scratch codes for safe storage, plain text scratch codes for first time use and the url to the QR activation code.

    Returns the generated TOTP credentials including the shared key along with hashed scratch codes for safe storage, plain text scratch codes for first time use and the url to the QR activation code.

    accountName

    A unique key which identifies a user on this provider (userID, email, ...).

    issuer

    The issuer name. This parameter cannot contain the colon

    returns

    The generated TOTP credentials including the shared key, scratch codes and qr url.

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. implicit val executionContext: ExecutionContext
    Definition Classes
    GoogleTotpProvider → ExecutionContextProvider
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  14. def id: String

    Returns the provider ID.

    Returns the provider ID.

    returns

    the provider ID.

    Definition Classes
    GoogleTotpProvider → Provider
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def isVerificationCodeValid(sharedKey: String, verificationCode: String): Boolean

    Returns true when the verification code is valid for the related shared key, false otherwise.

    Returns true when the verification code is valid for the related shared key, false otherwise.

    sharedKey

    TOTP shared key associated with the user.

    verificationCode

    Verification code, presumably valid at this moment.

    returns

    true when the verification code is valid for the related shared key, false otherwise.

    Attributes
    protected
  17. val logger: api.Logger
    Definition Classes
    Logger
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  21. val passwordHasherRegistry: PasswordHasherRegistry

    The Password hasher registry to use

  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from api.Logger

Inherited from ExecutionContextProvider

Inherited from Provider

Inherited from AnyRef

Inherited from Any

Ungrouped