承接 muhammadshakeel/laravel-api-boilerplate-oauth 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

muhammadshakeel/laravel-api-boilerplate-oauth

Composer 安装命令:

composer create-project muhammadshakeel/laravel-api-boilerplate-oauth

包简介

A RESTful API starter pack for Laravel 5 with OAuth2.

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License Codacy Badge

Based on francescomalatesta/laravel-api-boilerplate-jwt

Laravel API Boilerplate is a ready-to-use "starting pack" that you can use to build your first API in seconds. As you can easily imagine, it is built on top of the awesome Laravel Framework.

It also benefits from three pacakages:

With a similar foundation is really easy to get up and running in no time. I just made an "integration" work, adding here and there something that I found useful.

Installation

  • composer create-project muhammadshakeel/laravel-api-boilerplate-oauth your-project
  • cd your-project
  • php -r "copy('.env.example', '.env');"
  • php artisan key:generate
  • chmod -R 777 storage/ bootstrap/cache/
  • php artisan vendor:publish
  • php artisan migrate
  • php artisan db:seed --class=ClientTableSeeder

Done!

Main Features

A Ready-To-Use AuthController

I've put an "AuthController" in App\Api\V1\Controllers. It supports the four basic authentication/password recovery operations:

  • login();
  • signup();
  • recovery();
  • reset();

In order to work with them, you just have to make a POST request with the required data.

You will need:

  • login: just email and password;
  • signup: whatever you like: you can specify it in the config file;
  • recovery: just the user email address;
  • reset: token, email, password and password confirmation;

A Separate File for Routes

You can specify your routes in the *api_routes.php_ file, that will be automatically loaded. In this file you will find many examples of routes.

Configuration

As I already told before, this boilerplate is based on dingo/api and lucadegasperi/oauth2-server-laravel packages. So, you can find many informations about configuration here and here.

However, there are some extra options that I placed in a config/boilerplate.php file.

  • signup_fields: you can use this option to specify what fields you want to use to create your user;
  • signup_fields_rules: you can use this option to specify the rules you want to use for the validator instance in the signup method;
  • signup_token_release: if "true", an access token will be released from the signup endpoint if everything goes well. Otherwise, you will just get a 201 Created response;
  • reset_token_release: if "true", an access token will be released from the signup endpoint if everything goes well. Otherwise, you will just get a 200 response;
  • recovery_email_subject: here you can specify the subject for your recovery data email;

Creating Endpoints

You can create endpoints in the same way you could to with using the single dingo/api package. You can read its documentation for details.

After all, that's just a boilerplate! :)

Notes

I currently removed the VerifyCsrfToken middleware from the $middleware array in app/Http/Kernel.php file. If you want to use it in your project, just use the route middleware csrf you can find, in the same class, in the $routeMiddleware array.

Feedback

I currently made this project for personal purposes. I decided to share it here to help anyone with the same needs. If you have any feedback to improve it, feel free to make a suggestion, or open a PR!

muhammadshakeel/laravel-api-boilerplate-oauth 适用场景与选型建议

muhammadshakeel/laravel-api-boilerplate-oauth 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 95 次下载、GitHub Stars 达 15, 最近一次更新时间为 2016 年 01 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「api」 「oauth」 「oauth2」 「restful」 「server」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 muhammadshakeel/laravel-api-boilerplate-oauth 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 muhammadshakeel/laravel-api-boilerplate-oauth 我们能提供哪些服务?
定制开发 / 二次开发

基于 muhammadshakeel/laravel-api-boilerplate-oauth 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 15
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-19