raystech/psu-passport 问题修复 & 功能扩展

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

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

raystech/psu-passport

Composer 安装命令:

composer require raystech/psu-passport

包简介

PSU Passport Authentication for Laravel

README 文档

README

Hey! This package is still a Work in Progress. Files, instructions, and other stuff might change!

Installation

Require this package in your composer.json and update composer. This will download the package and PSU Passport.

composer require "raystech/psu-passport:^1.2"

If you're using Laravel 5.5 or higher you can skip the two config setups below.

Add the ServiceProvider to the providers array in config/app.php

Raystech\PSUPassport\PSUPassportServiceProvider::class,

You can use the facade for shorter code; if using Laravel 5.4 or lower, add this to your aliases:

'PSUPassport' => Raystech\PSUPassport\Facades\Passport::class,

Usage

Import to controller

use PSUPassport;

Basic example

Send credentials to authenticate

$credentials = ['username' => '', 'password' => ''];
$user = PSUPassport::authenticate($credentials);

Return authentication result

$user->auth();

Return user details object e.g.

  • username
  • title
  • firstname
  • lastname
  • gender
  • personal id
  • email
  • affiliation
  • campus
  • status
  • details(array)
$user->getUserDetails();

Return staff details array

$user->getStaffDetails();

Return user status e.g. Students, Staffs, Temporary Users

$user->status();

License

This package is licensed under MIT. You can do whatever you want as long as you include the original copyright and license notice in any copy of the software/source.

Credit

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固