public function timestampNonceHandler()
	{
		$timediff = abs(time() - $this->_provider->timestamp);

		if ($timediff > 600)
		{
			return OAUTH_BAD_TIMESTAMP;
		}

		$db = \App::get('db');

		if (!is_object($db))
		{
			return OAUTH_ERR_INTERNAL_ERROR;
		}

		$db->setQuery(
			"INSERT INTO `#__oauthp_nonces` (nonce,stamp,created) "
				. " VALUES (" .
				$db->quote($this->_provider->nonce) .
				"," .
				$db->quote($this->_provider->timestamp) .
				", UTC_TIMESTAMP());"
		);

		if (($db->query() === false) && ($db->getErrorNum() != 1062)) // duplicate row error ok (well expected anyway)
		{
			return OAUTH_ERR_INTERNAL_ERROR;
		}

		if ($db->getAffectedRows() < 1) // duplicate row error throws this error instead
		{
			return OAUTH_BAD_NONCE;
		}

		return OAUTH_OK;
	}
public function timestampNonceHandler()
	{
		$timediff = abs(time() - $this->_provider->timestamp);

		if ($timediff > 600)
		{
			return OAUTH_BAD_TIMESTAMP;
		}

		$db = \App::get('db');

		if (!is_object($db))
		{
			return OAUTH_ERR_INTERNAL_ERROR;
		}

		$db->setQuery(
			"INSERT INTO `#__oauthp_nonces` (nonce,stamp,created) "
				. " VALUES (" .
				$db->quote($this->_provider->nonce) .
				"," .
				$db->quote($this->_provider->timestamp) .
				", UTC_TIMESTAMP());"
		);

		if (($db->query() === false) && ($db->getErrorNum() != 1062)) // duplicate row error ok (well expected anyway)
		{
			return OAUTH_ERR_INTERNAL_ERROR;
		}

		if ($db->getAffectedRows() < 1) // duplicate row error throws this error instead
		{
			return OAUTH_BAD_NONCE;
		}

		return OAUTH_OK;
	}
public function timestampNonceHandler ( ) { $ timediff = abs ( time ( ) - $ this -> _provider -> timestamp ) ; if ( $ timediff > 600 ) { return OAUTH_BAD_TIMESTAMP ; } $ db = \ App :: get ( 'db' ) ; if ( ! is_object ( $ db ) ) { return OAUTH_ERR_INTERNAL_ERROR ; } $ db -> setQuery ( "INSERT INTO `#__oauthp_nonces` (nonce,stamp,created) " . " VALUES (" . $ db -> quote ( $ this -> _provider -> nonce ) . "," . $ db -> quote ( $ this -> _provider -> timestamp ) . ", UTC_TIMESTAMP());" ) ; if ( ( $ db -> query ( ) === false ) && ( $ db -> getErrorNum ( ) != 1062 ) ) // duplicate row error ok (well expected anyway) { return OAUTH_ERR_INTERNAL_ERROR ; } if ( $ db -> getAffectedRows ( ) < 1 ) // duplicate row error throws this error instead { return OAUTH_BAD_NONCE ; } return OAUTH_OK ; }
OAuthProvider timestampNonceHandler Callback

Validate timestamp and nonce assocaited with OAuthProvider instance

@return  OAUTH_OK on success
If timestamp is invalid (expired) returns OAUTH_BAD_TIMESTAMP
If nonce has been seen before returns OAUTH_BAD_NONCE
If lookup process failed for some reason returns OAUTH_ERR_INTERNAL_ERROR
OAuthProvider timestampNonceHandler Callback