Skip to content

Instantly share code, notes, and snippets.

@kiall
Created August 21, 2011 01:18
Show Gist options
  • Save kiall/1159941 to your computer and use it in GitHub Desktop.
Save kiall/1159941 to your computer and use it in GitHub Desktop.
if ($request->method() == Request::GET)
{
// Basic Request Validation
$params = $this->_get_authorize_params($request);
$validation = Validation::factory($params)
->rule('client_id', 'not_empty')
->rule('client_id', 'regex', array(':value', OAuth2::CLIENT_ID_REGEXP))
->rule('response_type', 'not_empty')
->rule('response_type', 'regex', array(':value', OAuth2::RESPONSE_TYPE_REGEXP))
->rule('redirect_uri', 'url');
if ( ! $validation->check())
{
}
echo "YES!";
exit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment