PHPackages                             oluwatobiakanji/laravel-modulr-auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. oluwatobiakanji/laravel-modulr-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

oluwatobiakanji/laravel-modulr-auth
===================================

Laravel 9 package to generate authentication headers for Modulr Finance

1.0.2(3y ago)091MITPHP

Since Aug 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Oluwatobi-beebittech/laravel-modulr-auth)[ Packagist](https://packagist.org/packages/oluwatobiakanji/laravel-modulr-auth)[ RSS](/packages/oluwatobiakanji-laravel-modulr-auth/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

Laravel Modulr Authentication Header
====================================

[](#laravel-modulr-authentication-header)

[![Latest Stable Version](https://camo.githubusercontent.com/bc9381773fe40d68c2e71d3c57ca5e10fdf08e8ad9e595328322ee64efac863c/687474703a2f2f706f7365722e707567782e6f72672f6f6c757761746f6269616b616e6a692f6c61726176656c2d6d6f64756c722d617574682f76)](https://packagist.org/packages/oluwatobiakanji/laravel-modulr-auth)[![License](https://camo.githubusercontent.com/3007100667ccf3ad74e4f41be5a973e20e180913dfed292a7d881ae49142de12/687474703a2f2f706f7365722e707567782e6f72672f6f6c757761746f6269616b616e6a692f6c61726176656c2d6d6f64756c722d617574682f6c6963656e7365)](https://packagist.org/packages/oluwatobiakanji/laravel-modulr-auth)[![Total Downloads](https://camo.githubusercontent.com/f6cc07b29fd7ff5cbe133c13d37a47c134be70bba4771eded95c66d872dd6fcd/687474703a2f2f706f7365722e707567782e6f72672f6f6c757761746f6269616b616e6a692f6c61726176656c2d6d6f64756c722d617574682f646f776e6c6f616473)](https://packagist.org/packages/oluwatobiakanji/laravel-modulr-auth)[![GitHub stars](https://camo.githubusercontent.com/e87559da8c0f83d7f4155569f6bf5e24420116c77167ec80e79c697c313a4fd1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f4f6c757761746f62692d626565626974746563682f6c61726176656c2d6d6f64756c722d61757468)](https://github.com/Oluwatobi-beebittech/laravel-modulr-auth/stargazers)[![GitHub forks](https://camo.githubusercontent.com/2b4a51ab8a42072ac6714d96e09a538c8850cc2c2dfd049f8290a3ac8d17ec5a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f4f6c757761746f62692d626565626974746563682f6c61726176656c2d6d6f64756c722d61757468)](https://github.com/Oluwatobi-beebittech/laravel-modulr-auth/network)

Laravel package to generate authentication headers for Modulr Finance

Installation
------------

[](#installation)

[PHP](https://php.net) 8.0+ and [Composer](https://getcomposer.org) are required.

To get the latest version of Laravel Modulr Auth, simply require it

```
composer require oluwatobiakanji/laravel-modulr-auth
```

Or add the following line to the require block of your `composer.json` file.

```
"oluwatobiakanji/laravel-modulr-auth": "^1.0.0"

```

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.

```
'providers' => [
    ...
    OluwatobiAkanji\ModulrAuth\ModulrAuthServiceProvider::class,
    ...
]
```

Also, register the Facade as:

```
'aliases' => [
    ...
    'AuthHeader' => OluwatobiAkanji\ModulrAuth\Facades\AuthHeader::class,
    ...
]
```

Configuration
-------------

[](#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

```
php artisan vendor:publish --tag=modulr-config
```

A configuration-file named `modulr.php` will be placed in the`config` directory:

```
