Get support for jeromegamez/mite-api-authentication-php

If you're new to LTH, please see our FAQ for more information on what it is we do.

Support Options

Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:

View Open Issues

Take a look to see if anyone else has experienced the same issue as you and if they managed to solve it.

Open an Issue

Make sure to read any relevant guidelines for opening issues on this repo before posting a new issue.

Sponsor directly

Check out the page and see if there are any options to sponsor this project or it's developers directly.

jeromegamez/mite-api-authentication-php

mite API Authentication

Authentication middlewares to support access to the mite API

This package is no longer maintained. Use https://github.com/jeromegamez/mite-php instead

Installation

composer require gamez/mite-api-authentication

Usage

Guzzle

http://docs.guzzlephp.org/en/stable/handlers-and-middleware.html

use Gamez\Mite\MiteAuthenticationMiddleware;
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;

$stack = HandlerStack::create();
$stack->push(new MiteAuthenticationMiddleware('accountname', 'apikey'));

$client = new Client(['handler' => $stack]);

HTTPlug

http://docs.php-http.org/en/latest/plugins/authentication.html

use Gamez\Mite\MiteAuthentication;
use Http\Discovery\HttpClientDiscovery;
use Http\Message\Authentication\BasicAuth;
use Http\Client\Common\PluginClient;
use Http\Client\Common\Plugin\AuthenticationPlugin;

$authentication = new MiteAuthentication('accountname', 'apikey');
$authenticationPlugin = new AuthenticationPlugin($authentication);

$client = new PluginClient(
    HttpClientDiscovery::find(),
    [$authenticationPlugin]
);

Custom

use Gamez\Mite\MiteRequestAuthenticator;

$authenticator = new MiteRequestAuthenticator('accountname', 'apikey');
$request = ...; // an implementation of Psr\Http\Message\RequestInterface

$authenticatedRequest = $authenticator->authenticate($request);
Our Mission

We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.

Interesting Articles

Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated

p-e622a1a2