Password
extends AbstractGrant
in package
Represents a resource owner password credentials grant.
Tags
Table of Contents
Methods
- __toString() : string
- Returns this grant's name as its string representation. This allows for string interpolation when building URL query parameters.
- prepareRequestParameters() : array<string|int, mixed>
- Prepares an access token request's parameters by checking that all required parameters are set, then merging with any given defaults.
- getName() : string
- Returns the name of this grant, eg. 'grant_name', which is used as the grant type when encoding URL query parameters.
- getRequiredRequestParameters() : array<string|int, mixed>
- Returns a list of all required request parameters.
- checkRequiredParameter() : void
- Checks for a required parameter in a hash.
- checkRequiredParameters() : void
- Checks for multiple required parameters in a hash.
Methods
__toString()
Returns this grant's name as its string representation. This allows for string interpolation when building URL query parameters.
public
__toString() : string
Return values
stringprepareRequestParameters()
Prepares an access token request's parameters by checking that all required parameters are set, then merging with any given defaults.
public
prepareRequestParameters(array<string|int, mixed> $defaults, array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $defaults : array<string|int, mixed>
- $options : array<string|int, mixed>
Return values
array<string|int, mixed>getName()
Returns the name of this grant, eg. 'grant_name', which is used as the grant type when encoding URL query parameters.
protected
getName() : string
Tags
Return values
stringgetRequiredRequestParameters()
Returns a list of all required request parameters.
protected
getRequiredRequestParameters() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>checkRequiredParameter()
Checks for a required parameter in a hash.
private
checkRequiredParameter(string $name, array<string|int, mixed> $params) : void
Parameters
- $name : string
- $params : array<string|int, mixed>
Tags
checkRequiredParameters()
Checks for multiple required parameters in a hash.
private
checkRequiredParameters(array<string|int, mixed> $names, array<string|int, mixed> $params) : void
Parameters
- $names : array<string|int, mixed>
- $params : array<string|int, mixed>