Modules

Kohana_OAuth_Token_Request
extends OAuth_Token
extends Kohana_OAuth_Token

OAuth Request Token

package
Kohana/OAuth
category
Token
author
Kohana Team
copyright
© 2010 Kohana Team
license
http://kohanaframework.org/license
since
3.0.7

Class declared in MODPATH/oauth/classes/kohana/oauth/token/request.php on line 12.

Properties

protected $name

protected $required

protected string $secret

token secret

protected string $token

token key

protected string $verifier

request token verifier

Methods

public verifier( string $verifier ) (defined in Kohana_OAuth_Token_Request)

Change the token verifier.

$token->verifier($key);

Parameters

  • string $verifier required - New verifier

Return Values

  • $this

Source Code

public function verifier($verifier)
{
	$this->verifier = $verifier;

	return $this;
}

public __construct( [ array $options = NULL ] ) (defined in Kohana_OAuth_Token)

Sets the token and secret values.

Parameters

  • array $options = NULL - Token options

Return Values

  • void

Source Code

public function __construct(array $options = NULL)
{
	foreach ($this->required as $key)
	{
		if ( ! isset($options[$key]))
		{
			throw new Kohana_OAuth_Exception('Required option not passed: :option',
				array(':option' => $key));
		}

		$this->$key = $options[$key];
	}
}

public __get( string $key ) (defined in Kohana_OAuth_Token)

Return the value of any protected class variable.

// Get the token secret
$secret = $token->secret;

Parameters

  • string $key required - Variable name

Return Values

  • mixed

Source Code

public function __get($key)
{
	return $this->$key;
}

public __toString( ) (defined in Kohana_OAuth_Token)

Returns the token key.

Return Values

  • string

Source Code

public function __toString()
{
	return (string) $this->token;
}

public static factory( string $name [, array $options = NULL ] ) (defined in Kohana_OAuth_Token)

Create a new token object.

$token = OAuth_Token::factory($name);

Parameters

  • string $name required - Token type
  • array $options = NULL - Token options

Return Values

  • OAuth_Token

Source Code

public static function factory($name, array $options = NULL)
{
	$class = 'OAuth_Token_'.$name;

	return new $class($options);
}