CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Team
    • Issues (Github)
    • YouTube Channel
    • Get Involved
    • Bakery
    • Featured Resources
    • Newsletter
    • Certification
    • My CakePHP
    • CakeFest
    • Facebook
    • Twitter
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 3.8 Red Velvet API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 3.8
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Cake
    • Auth
      • Storage
    • Cache
      • Engine
    • Collection
      • Iterator
    • Command
    • Console
      • Exception
    • Controller
      • Component
      • Exception
    • Core
      • Configure
        • Engine
      • Exception
      • Retry
    • Database
      • Driver
      • Exception
      • Expression
      • Schema
      • Statement
      • Type
    • Datasource
      • Exception
    • Error
      • Middleware
    • Event
      • Decorator
    • Filesystem
    • Form
    • Http
      • Client
        • Adapter
        • Auth
      • Cookie
      • Exception
      • Middleware
      • Session
    • I18n
      • Formatter
      • Middleware
      • Parser
    • Log
      • Engine
    • Mailer
      • Exception
      • Transport
    • Network
      • Exception
    • ORM
      • Association
      • Behavior
        • Translate
      • Exception
      • Locator
      • Rule
    • Routing
      • Exception
      • Filter
      • Middleware
      • Route
    • Shell
      • Helper
      • Task
    • TestSuite
      • Fixture
      • Stub
    • Utility
      • Exception
    • Validation
    • View
      • Exception
      • Form
      • Helper
      • Widget
  • None

Classes

  • Basic
  • Digest
  • Oauth

Class Oauth

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 Cake\Http\Client when $options['auth']['type'] is 'oauth'

Namespace: Cake\Http\Client\Auth
Location: Http/Client/Auth/Oauth.php

Method Summary

  • _buildAuth() protected
    Builds the Oauth Authorization header value.
  • _encode() protected
    URL Encodes a value based on rules of rfc3986
  • _hmacSha1() protected
    Use HMAC-SHA1 signing.
  • _normalizeData() protected
    Recursively convert request data into the normalized form.
  • _normalizedParams() protected
    Sorts and normalizes request data and oauthValues
  • _normalizedUrl() protected
    Builds a normalized URL
  • _plaintext() protected
    Plaintext signing
  • _rsaSha1() protected
    Use RSA-SHA1 signing.
  • authentication() public
    Add headers for Oauth authorization.
  • baseString() public
    Generate the Oauth basestring

Method Detail

_buildAuth() protected ¶

_buildAuth( array $data )

Builds the Oauth Authorization header value.

Parameters
array $data
The oauth_* values to build
Returns
string

_encode() protected ¶

_encode( string $value )

URL Encodes a value based on rules of rfc3986

Parameters
string $value
Value to encode.
Returns
string

_hmacSha1() protected ¶

_hmacSha1( Cake\Http\Client\Request $request , array $credentials )

Use HMAC-SHA1 signing.

This method is suitable for plain HTTP or HTTPS.

Parameters
Cake\Http\Client\Request $request
The request object.
array $credentials
Authentication credentials.
Returns
string

_normalizeData() protected ¶

_normalizeData( array $args , string $path = '' )

Recursively convert request data into the normalized form.

Parameters
array $args
The arguments to normalize.
string $path optional ''
The current path being converted.
Returns
array
See
https://tools.ietf.org/html/rfc5849#section-3.4.1.3.2

_normalizedParams() protected ¶

_normalizedParams( Cake\Http\Client\Request $request , array $oauthValues )

Sorts and normalizes request data and oauthValues

Section 9.1.1 of Oauth spec.

  • URL encode keys + values.
  • Sort keys & values by byte value.
Parameters
Cake\Http\Client\Request $request
The request object.
array $oauthValues
Oauth values.
Returns
string
sorted and normalized values

_normalizedUrl() protected ¶

_normalizedUrl( Psr\Http\Message\UriInterface $uri )

Builds a normalized URL

Section 9.1.2. of the Oauth spec

Parameters
Psr\Http\Message\UriInterface $uri
Uri object to build a normalized version of.
Returns
string
Normalized URL

_plaintext() protected ¶

_plaintext( Cake\Http\Client\Request $request , array $credentials )

Plaintext signing

This method is not suitable for plain HTTP. You should only ever use PLAINTEXT when dealing with SSL services.

Parameters
Cake\Http\Client\Request $request
The request object.
array $credentials
Authentication credentials.
Returns
string
Authorization header.

_rsaSha1() protected ¶

_rsaSha1( Cake\Http\Client\Request $request , array $credentials )

Use RSA-SHA1 signing.

This method is suitable for plain HTTP or HTTPS.

Parameters
Cake\Http\Client\Request $request
The request object.
array $credentials
Authentication credentials.
Returns
string
Throws
RuntimeException

authentication() public ¶

authentication( Cake\Http\Client\Request $request , array $credentials )

Add headers for Oauth authorization.

Parameters
Cake\Http\Client\Request $request
The request object.
array $credentials
Authentication credentials.
Returns
Cake\Http\Client\Request
The updated request.
Throws
Cake\Core\Exception\Exception
On invalid signature types.

baseString() public ¶

baseString( Cake\Http\Client\Request $request , array $oauthValues )

Generate the Oauth basestring

  • Querystring, request data and oauth_* parameters are combined.
  • Values are sorted by name and then value.
  • Request values are concatenated and urlencoded.
  • The request URL (without querystring) is normalized.
  • The HTTP method, URL and request parameters are concatenated and returned.
Parameters
Cake\Http\Client\Request $request
The request object.
array $oauthValues
Oauth values.
Returns
string
Follow @CakePHP
#IRC
OpenHub
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Logos & Trademarks
  • Community
  • Team
  • Issues (Github)
  • YouTube Channel
  • Get Involved
  • Bakery
  • Featured Resources
  • Newsletter
  • Certification
  • My CakePHP
  • CakeFest
  • Facebook
  • Twitter
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs