CakeFest 2024: The Official CakePHP Conference

OAuthProvider::timestampNonceHandler

(PECL OAuth >= 1.0.0)

OAuthProvider::timestampNonceHandlerEstablece el callback timestampNonceHandler

Descripción

public OAuthProvider::timestampNonceHandler(callable $callback_function): void

Establece el manejador callback timestamp nonce, el cual será llamado luego con OAuthProvider::callTimestampNonceHandler(). Errores relacionados con timestamp/nonce son lanzados a este callback.

Advertencia

Esta función no está documentada actualmente, solamente se encuentra disponible la lista de parámetros.

Parámetros

callback_function

El nombre de la función callable.

Valores devueltos

No devuelve ningún valor.

Ejemplos

Ejemplo #1 Ejemplo de OAuthProvider::timestampNonceHandler()

<?php
function timestampNonceChecker($provider) {

if (
$provider->nonce === 'bad') {
return
OAUTH_BAD_NONCE;
} elseif (
$provider->timestamp == '0') {
return
OAUTH_BAD_TIMESTAMP;
}

return
OAUTH_OK;
}
?>

Ver también

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top