Download the PHP package oluwatobiakanji/laravel-modulr-auth without Composer
On this page you can find all versions of the php package oluwatobiakanji/laravel-modulr-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oluwatobiakanji/laravel-modulr-auth
More information about oluwatobiakanji/laravel-modulr-auth
Files in oluwatobiakanji/laravel-modulr-auth
Package laravel-modulr-auth
Short Description Laravel 9 package to generate authentication headers for Modulr Finance
License MIT
Informations about the package laravel-modulr-auth
Laravel Modulr Authentication Header
Laravel package to generate authentication headers for Modulr Finance
Installation
PHP 8.0+ and Composer are required.
To get the latest version of Laravel Modulr Auth, simply require it
Or add the following line to the require block of your composer.json
file.
You'll then need to run composer install
or composer update
to download it and have the autoloader updated.
By default, the ModulrAuthServiceProvider
service provider will get registered automatically in config/app.php
. However, to manually register the serivce provider, add the following to the providers
key.
Also, register the Facade as:
Configuration
The Laravel modulr auth package comes with a configuration file for the API key and secret provided by Modulr Finance. Also, the base URL and routes for accessing Modulr Finance (either sandbox or live) can be configured here.
Publish Configuration as
A configuration-file named modulr.php
will be placed in theconfig
directory:
Add the following environment variables to the .env
file of the project
Usage
The AuthHeader
is to be accessed via the facade OluwatobiAkanji\ModulrAuth\Facades\AuthHeader
.
In a class, import the facade as:
use OluwatobiAkanji\ModulrAuth\Facades\AuthHeader
Then use the facade to access these methods:
getHeaders
asAuthHeader::getHeaders()
orAuthHeader::getHeaders("nonce_value", "timestamp_value")
setNonce
asAuthHeader::setNonce("nonce_value")
setTimestamp
asAuthHeader::setTimestamp("timestamp_value")
Contributing
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
How can I thank you?
Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!
Thanks! Oluwatobi Akanji.
License
The MIT License (MIT). Please see License File for more information
All versions of laravel-modulr-auth with dependencies
orchestra/testbench Version ^7.0
illuminate/contracts Version ~6|~7|~8|~9