Oauth 1 authentication strategy for Cake\Http\Client
This object does not handle getting Oauth access tokens from the service provider. It only handles make client requests after you have obtained the Oauth tokens.
Generally not directly constructed, but instead used by {@link \Cake\Http\Client} when $options['auth']['type'] is 'oauth'
Builds the Oauth Authorization header value.
URL Encodes a value based on rules of rfc3986
Use HMAC-SHA1 signing.
Recursively convert request data into the normalized form.
Sorts and normalizes request data and oauthValues
Builds a normalized URL
Plaintext signing
Use RSA-SHA1 signing.
Add headers for Oauth authorization.
Generate the Oauth basestring
Check for SSL errors and raise if one is encountered.
_buildAuth(array $data): string
Builds the Oauth Authorization header value.
array
$data The oauth_* values to build
string
_encode(string $value): string
URL Encodes a value based on rules of rfc3986
string
$value Value to encode.
string
_hmacSha1(Cake\Http\Client\Request $request, array $credentials): string
Use HMAC-SHA1 signing.
This method is suitable for plain HTTP or HTTPS.
Cake\Http\Client\Request
$request The request object.
array
$credentials Authentication credentials.
string
_normalizeData(array $args, string $path = ''): array
Recursively convert request data into the normalized form.
array
$args The arguments to normalize.
string
$path optional The current path being converted.
array
_normalizedParams(Cake\Http\Client\Request $request, array $oauthValues): string
Sorts and normalizes request data and oauthValues
Section 9.1.1 of Oauth spec.
Cake\Http\Client\Request
$request The request object.
array
$oauthValues Oauth values.
string
_normalizedUrl(Psr\Http\Message\UriInterface $uri): string
Builds a normalized URL
Section 9.1.2. of the Oauth spec
Psr\Http\Message\UriInterface
$uri Uri object to build a normalized version of.
string
_plaintext(Cake\Http\Client\Request $request, array $credentials): string
Plaintext signing
This method is not suitable for plain HTTP. You should only ever use PLAINTEXT when dealing with SSL services.
Cake\Http\Client\Request
$request The request object.
array
$credentials Authentication credentials.
string
_rsaSha1(Cake\Http\Client\Request $request, array $credentials): string
Use RSA-SHA1 signing.
This method is suitable for plain HTTP or HTTPS.
Cake\Http\Client\Request
$request The request object.
array
$credentials Authentication credentials.
string
RuntimeException
authentication(Cake\Http\Client\Request $request, array $credentials): Cake\Http\Client\Request
Add headers for Oauth authorization.
Cake\Http\Client\Request
$request The request object.
array
$credentials Authentication credentials.
Cake\Http\Client\Request
Cake\Core\Exception\CakeException
baseString(Cake\Http\Client\Request $request, array $oauthValues): string
Generate the Oauth basestring
Cake\Http\Client\Request
$request The request object.
array
$oauthValues Oauth values.
string
checkSslError(): void
Check for SSL errors and raise if one is encountered.
void
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Http.Client.Auth.Oauth.html