aplr/laravel-bouncer

There is no license information available for the latest version (v0.1.6) of this package.

Rigorously restricts access to your apis.

Maintainers

👁 aplr

Package info

github.com/aplr/laravel-bouncer

Issues

pkg:composer/aplr/laravel-bouncer

Statistics

Installs: 141

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.6 2018-05-08 17:09 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Unknown License 4276ab7b95be9541c185eec8432979735ded15c6

  • Andreas Pfurtscheller <hello.woop@aplr.me>

apiaccesslaravelbouncer

This package is auto-updated.

Last update: 2026-06-20 13:32:42 UTC


README

Introduction

The bouncer package enables you to restrict access to your apis using application keys.

Installation

Require the aplr/laravel-bouncer package in your composer.json and update your dependencies:

$ composer require aplr/laravel-bouncer

Usage

In order to check if requests to your api include a valid key, you can use the Bounce-middleware:

protected $middlewareGroups = [
 'web' => [
 // ...
 ],

 'api' => [
 // ...
 \Aplr\Bouncer\Bounce::class,
 ],
];

To generate a new key, simply use the following method:

use Aplr\Bodybuilder\Facades\Bouncer;

$key = Bouncer::createKey('My App');

You can manually check if a given key is valid by using the following method:

$valid = Bouncer::check('ZKEpwUSii5yvWt1xgLwHd8yguQGBZtrSi39hXFFd');