Yii2-RESTful-API-with-OAuth2

  • 所有者: sirinibin/Yii2-RESTful-API-with-OAuth2
  • 平台:
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

This is a RESTful API with OAuth2 authentication/security developed using Yii2 framework.
You can use this if you want to quick start developing your own custom RESTful API by skipping 95% of your scratch works.
Hopefully this will save lot of your time as this API includes all the basic stuffs you need to get started.

This API also includes a developer dashboard with the API documentation which is developed in Yii2. This will be useful to manage your developers access to the API documentation.

DEMO

http://developers.yii2.nintriva.net
Login: developer/developer

Official Documentation

Documentation for this RESTful API can be found on the Yii2 RESTful API with OAuth2 Documenation.

Security Vulnerabilities

If you discover a security vulnerability within this template, please send an e-mail to Sirin k at sirin@nintriva.com. All security vulnerabilities will be promptly addressed.

License

The Lumen framework is open-sourced software licensed under the MIT license

INSTALLATION

Step1: Create a database named yii2_rest
Step2:Clone the source code
git clone -b master https://github.com/sirinibin/yii2-rest.git

Step3: cd yii2-rest
Step4:composer install
Step5: ./init
Step6: vim common/config/main-local.php
change db information
 'db' => [

            'class' => 'yii\db\Connection',

            'dsn' => 'mysql:host=127.0.0.1;dbname=yii2_rest',

            'username' => 'root',

            'password' => '123',

            'charset' => 'utf8',

        ],

Step7: Run db migration
           cd /var/www/yii2-rest
            ./yii migrate

Step8:
            point API end point URL to backend
             /var/www/yii2-rest/backend/web


            point frontend URL to frontend
             /var/www/yii2-rest/frontend/web

DIRECTORY STRUCTURE

common
    config/              contains shared configurations
    mail/                contains view files for e-mails
    models/              contains model classes used in both backend and frontend
    tests/               contains tests for common classes    
console
    config/              contains console configurations
    controllers/         contains console controllers (commands)
    migrations/          contains database migrations
    models/              contains console-specific model classes
    runtime/             contains files generated during runtime
backend
    assets/              contains application assets such as JavaScript and CSS
    config/              contains backend configurations
    controllers/         contains Web controller classes
    models/              contains backend-specific model classes
    runtime/             contains files generated during runtime
    tests/               contains tests for backend application    
    views/               contains view files for the Web application
    web/                 contains the entry script and Web resources
frontend
    assets/              contains application assets such as JavaScript and CSS
    config/              contains frontend configurations
    controllers/         contains Web controller classes
    models/              contains frontend-specific model classes
    runtime/             contains files generated during runtime
    tests/               contains tests for frontend application
    views/               contains view files for the Web application
    web/                 contains the entry script and Web resources
    widgets/             contains frontend widgets
vendor/                  contains dependent 3rd-party packages
environments/            contains environment-based overrides

Latest Stable Version
Total Downloads
Build Status

主要指標

概覽
名稱與所有者sirinibin/Yii2-RESTful-API-with-OAuth2
主編程語言PHP
編程語言PHP (語言數: 4)
平台
許可證Other
所有者活动
創建於2017-09-17 05:03:54
推送於2018-09-29 21:11:09
最后一次提交2018-09-30 02:41:04
發布數0
用户参与
星數88
關注者數9
派生數35
提交數23
已啟用問題?
問題數11
打開的問題數8
拉請求數0
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?