Larabros\Elogram\Http\Middleware\SecureRequestMiddleware

class SecureRequestMiddleware

A middleware class for making secure requests to Instagram’s API.

property nextHandler

protected callable

The next handler in the stack.

property config

protected ConfigInterface

The application configuration.

__invoke(RequestInterface $request, $options)

{@inheritDoc}

Parameters:
  • $request (RequestInterface) –
  • $options
generateSig($endpoint, $params, $secret)

Generates a sig value for a request.

Parameters:
  • $endpoint
  • $params
  • $secret
Returns:

string

create(ConfigInterface $config)

Factory method used to register this middleware on a handler stack.

Parameters:
  • $config (ConfigInterface) –
Returns:

Closure

getPath(UriInterface $uri)

Gets the path from a UriInterface instance after removing the version prefix.

Parameters:
  • $uri (UriInterface) –
Returns:

string

getQueryParams(UriInterface $uri, $exclude =, ['sig', ]$params =[])

Gets the query parameters as an array from a UriInterface instance.

Parameters:
  • $uri (UriInterface) –
  • $exclude (array) –
  • $params (array) –
Returns:

array

__construct($nextHandler, ConfigInterface $config)

Creates an instance of AbstractMiddleware.

Parameters:
  • $nextHandler
  • $config (ConfigInterface) –