\Osiset\BasicShopifyAPI\MiddlewareAuthRequest

Ensures we have the proper request for private and public calls.

Also modifies issues with redirects.

Summary

Methods
Properties
Constants
__construct()
__invoke()
No public properties found
No constants found
isGraphRequest()
isRestRequest()
isAuthableRequest()
versionPath()
isVersionableRequest()
$api
N/A
No private methods found
No private properties found
N/A

Properties

$api

$api : \Osiset\BasicShopifyAPI\BasicShopifyAPI

The API instance.

Type

\Osiset\BasicShopifyAPI\BasicShopifyAPI

Methods

__construct()

__construct(\Osiset\BasicShopifyAPI\BasicShopifyAPI  $api) : self

Setup.

Parameters

\Osiset\BasicShopifyAPI\BasicShopifyAPI $api

The API instance.

Returns

self

__invoke()

__invoke(callable  $handler) : callable

Run.

Parameters

callable $handler

Throws

\Exception

For missing API key or password for private apps.

\Exception

For missing access token on GraphQL calls.

Returns

callable

isGraphRequest()

isGraphRequest(string  $uri) : boolean

Determines if the request is to Graph API.

Parameters

string $uri

The request URI.

Returns

boolean

isRestRequest()

isRestRequest(string  $uri) : boolean

Determines if the request is to REST API.

Parameters

string $uri

The request URI.

Returns

boolean

isAuthableRequest()

isAuthableRequest(string  $uri) : boolean

Determines if the request requires auth headers.

Parameters

string $uri

The request URI.

Returns

boolean

versionPath()

versionPath(string  $uri) : string

Versions the API call with the set version.

Parameters

string $uri

The request URI.

Returns

string

isVersionableRequest()

isVersionableRequest(string  $uri) : boolean

Determines if the request requires versioning.

Parameters

string $uri

The request URI.

Returns

boolean