bencoderus/min-auth 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bencoderus/min-auth

Composer 安装命令:

composer require bencoderus/min-auth

包简介

This package serves as a token based client authentication system.

README 文档

README

Laravel webhook preview

Min Auth

Build Status Latest Stable Version License

Min Auth is a Laravel package that allows you to create and manage a client based authentication system on your Laravel web application.

Installation

This package requires PHP >= 7.2 and above. (Laravel 8 and PHP 8 support are available).

You can install the package via composer:

composer require bencoderus/min-auth

Publish migration and configurations.

php artisan min-auth:install

Run migrations

php artisan migrate

Usage

Min Auth commands

Publish migration and configurations.

php artisan min-auth:install

Create a client

php artisan min-auth:create-client {name}

Using the middleware to protect your routes.

In your route add auth.client

Route::get('test', function(){
    return "Hello world";
})->middleware('auth.client');

In your controller add auth.client

public function __construct(){
    $this->middleware('auth.client');
}

Using the helpers

Import Min Auth Helper

use Bencoderus\MinAuth\MinAuth;

Create a client

MinAuth::createClient($name);
// Optional
MinAuth::createClient($name, $ip, $isBlacklisted);

Find a client by API key

MinAuth::findByApiKey($apiKey);

Blacklist a client

MinAuth::blacklistClient($client);

Whitelist a client

MinAuth::whitelistClient($client);

Refresh Client API key

MinAuth::refreshApiKey($client);

Update client Ip address

$ip = "127.0.0.8";
MinAuth::updateIpAddress($client, $ip);

Configuration

You can turn off IP Address verification via config/min-auth.php

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email bencoderus@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固