PHPackages                             siewwp/laravel-service-host - 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. siewwp/laravel-service-host

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

siewwp/laravel-service-host
===========================

laravel server-to-server service host with HMAC authentication

v1.1.1(7y ago)0132MITPHP

Since Jun 16Pushed 7y ago1 watchersCompare

[ Source](https://github.com/siewwp/laravel-service-host)[ Packagist](https://packagist.org/packages/siewwp/laravel-service-host)[ RSS](/packages/siewwp-laravel-service-host/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (9)Versions (9)Used By (0)

Laravel service host
====================

[](#laravel-service-host)

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

[](#installation)

```
composer require siewwp/laravel-service-host:^1.0.0

```

Publish service host config

```
php artisan vendor:publish --provider="Siewwp\LaravelServiceHost\ServiceHostServiceProvider" --tag="config"
```

Publish service host migration

```
php artisan vendor:publish --provider="Siewwp\LaravelServiceHost\ServiceHostServiceProvider" --tag="migrations"
```

Run migration

```
php artisan migrate

```

run the command below on console to create host

```
php artisan service-host:client {name} {webhook_url}

```

Guide
-----

[](#guide)

### Authenticating client request

[](#authenticating-client-request)

Add clients user provider in your `auth.php` configuration file.

```
'providers' => [
    'clients' => [
        'driver' => 'eloquent',
        'model' => Siewwp\LaravelServiceHost\Client::class,
    ],
],
```

Finally, you may use this provider in your guards configuration:

```
'guards' => [
    'client' => [
        'driver' => 'service-host',
        'provider' => 'clients',
    ],
],
```

### Sending a webhook notification

[](#sending-a-webhook-notification)

To send notification, create a notification and specify `WebhookChannel::class` like below:

```
