
Public Member Functions | |
| __construct () | |
| validate () | |
Public Member Functions inherited from snuze\Request\Request | |
| addHeader (string $name, string $value) | |
| getHeaders () | |
| addParameter (string $name, $value=null) | |
| getParameter (string $name) | |
| getParameters () | |
| getApiUri () | |
| getEndpointPath () | |
| getVerb () | |
| getRequiresAuthentication () | |
| getMandatoryParameters () | |
| validate () | |
Public Member Functions inherited from snuze\SnuzeObject | |
| __construct (array $args=null) | |
| _getSnuzeId () | |
| _getSnuzeClass () | |
| _ident () | |
Public Attributes | |
| const | PARAM_GRANT_TYPE = 'grant_type' |
| const | PARAM_USERNAME = 'username' |
| const | PARAM_PASSWORD = 'password' |
Public Attributes inherited from snuze\Request\Request | |
| const | API_URIS |
| const | VERB_GET = 'GET' |
| const | VERB_POST = 'POST' |
| const | VERB_DELETE = 'DELETE' |
Additional Inherited Members | |
Static Public Member Functions inherited from snuze\Request\Request | |
| static | getValidParameters () |
| static | getValidVerbs () |
Protected Member Functions inherited from snuze\Request\Request | |
| setApiUri (string $apiUri) | |
| setEndpointPath (string $endpointPath) | |
| setVerb (string $verb) | |
| setRequiresAuthentication (bool $requiresAuthentication) | |
Protected Member Functions inherited from snuze\SnuzeObject | |
| debug (string $message, bool $echo=false) | |
| info (string $message, bool $echo=false) | |
| warning (string $message, bool $echo=false) | |
| error (string $message, bool $echo=false) | |
Protected Attributes inherited from snuze\Request\Request | |
| $parameters = [] | |
| $mandatoryParameters = [] | |
Protected Attributes inherited from snuze\SnuzeObject | |
| $_snuzeId = null | |
| $_snuzeClass = null | |
AccessToken defines the structure and parameters of a request to the /api/v1/access_token API endpoint.
This endpoint returns an OAuth bearer token upon successful authentication.
This file is part of Snuze, a PHP client for the Reddit API. Copyright 2019 Shaun Cummiskey shaun@shaunc.com https://shaunc.com/ Repository: https://github.com/snuze/snuze/ Documentation: https://snuze.shaunc.com/
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| snuze\Request\AccessToken::__construct | ( | ) |
Constructor. Calls parent, then sets properties specific to this Request.
References snuze\Request\AccessToken\PARAM_GRANT_TYPE, snuze\Request\AccessToken\PARAM_PASSWORD, snuze\Request\AccessToken\PARAM_USERNAME, snuze\Request\Request\setApiUri(), snuze\Request\Request\setEndpointPath(), snuze\Request\Request\setRequiresAuthentication(), and snuze\Request\Request\setVerb().
| snuze\Request\AccessToken::validate | ( | ) |
Overrides and calls parent. Performs parameter validation specific to this type of Request.
References snuze\Request\Request\getParameter().
| const snuze\Request\AccessToken::PARAM_GRANT_TYPE = 'grant_type' |
Defines the "grant_type" parameter name as valid. At present, only the 'password' grant type is supported by Snuze.
| const snuze\Request\AccessToken::PARAM_PASSWORD = 'password' |
Defines the "password" parameter name as valid
| const snuze\Request\AccessToken::PARAM_USERNAME = 'username' |
Defines the "username" parameter name as valid