You are here

public static function HandlerStack::create in Auth0 Single Sign On 8.2

Creates a default handler stack that can be used by clients.

The returned handler will wrap the provided handler or use the most appropriate default handler for your system. The returned HandlerStack has support for cookies, redirects, HTTP error exceptions, and preparing a body before sending.

The returned handler stack can be passed to a client in the "handler" option.

Parameters

callable $handler HTTP handler function to use with the stack. If no: handler is provided, the best handler for your system will be utilized.

Return value

HandlerStack

10 calls to HandlerStack::create()
Auth0Test::testThatExchangeSkipsUserinfo in vendor/auth0/auth0-php/tests/Auth0Test.php
Test that the skip_userinfo config option uses the ID token instead of calling /userinfo.
Auth0Test::testThatExchangeSucceedsWithIdToken in vendor/auth0/auth0-php/tests/Auth0Test.php
Test that the exchanges succeeds when there is both and access token and an ID token present.
Auth0Test::testThatExchangeSucceedsWithNoIdToken in vendor/auth0/auth0-php/tests/Auth0Test.php
Test that the exchanges succeeds when there is only an access token.
Auth0Test::testThatRenewTokensFailsIfNoAccessOrIdTokenReturned in vendor/auth0/auth0-php/tests/Auth0Test.php
Test that renewTokens fails if the API response is invalid.
Auth0Test::testThatRenewTokensFailsIfThereIsNoRefreshToken in vendor/auth0/auth0-php/tests/Auth0Test.php
Test that renewTokens fails if there is no refresh_token stored.

... See full list

File

vendor/guzzlehttp/guzzle/src/HandlerStack.php, line 40

Class

HandlerStack
Creates a composed Guzzle handler function by stacking middlewares on top of an HTTP handler function.

Namespace

GuzzleHttp

Code

public static function create(callable $handler = null) {
  $stack = new self($handler ?: choose_handler());
  $stack
    ->push(Middleware::httpErrors(), 'http_errors');
  $stack
    ->push(Middleware::redirect(), 'allow_redirects');
  $stack
    ->push(Middleware::cookies(), 'cookies');
  $stack
    ->push(Middleware::prepareBody(), 'prepare_body');
  return $stack;
}