CakeFest 2024: The Official CakePHP Conference

OAuthProvider::tokenHandler

(PECL OAuth >= 1.0.0)

OAuthProvider::tokenHandlerEstablece el manejador callback de tokenHandler

Descripción

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

Establece el token del callback, que será llamado después con OAuthProvider::callTokenHandler().

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 del callback OAuthProvider::tokenHandler()

<?php
function tokenHandler($provider) {

if (
$provider->token === 'rejected') {
return
OAUTH_TOKEN_REJECTED;
} elseif (
$provider->token === 'revoked') {
return
OAUTH_TOKEN_REVOKED;
}

$provider->token_secret = "the_tokens_secret";
return
OAUTH_OK;
}
?>

Ver también

add a note

User Contributed Notes

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