SproutCMS

This is the code documentation for the SproutCMS project

function checkCode()

Check a given code against a given secret

Does the check three times, for current time, one period before, and one period after
This is to allow for clock drift

Usage

bool $GoogleAuthenticator->checkCode ( string $secret , string $code );

Arguments

  1. string $secret
    The secret key, as a base32 string
  2. string $code
    Numeric code entered by the user to be checked

Return value

  • bool
    True if code matches, false if it does not