golive_jxw/governmentaffair

v3.0.0 2022-08-26 06:39 UTC

This package is auto-updated.

Last update: 2024-10-26 11:07:56 UTC


README

for Laravel

Installation

composer require golive_jxw/governmentaffair -vvv

Configuration

The defaults configuration settings are set in config/governmentaffair.php. Copy this file to your own config directory to modify the values. You can publish the config using this command:

php artisan vendor:publish --provider="Government\Affair\ServiceProvider"

Usage

SingleSignOn

use Government\Affair\Classes\User;

//alipay-支付宝入口
//ZhejiangOffice-同源APP入口(含浙里办APP及其他同源适配APP容器环境)

$user = new User();
$user->auth($goto,'ZhejiangOffice');

TicketAuthentication

//alipay-支付宝入口
//ZhejiangOffice-同源APP入口(含浙里办APP及其他同源适配APP容器环境)
use Government\Affair\Classes\User;
$user = new User();
$user->ticket($ticket);
//wechat-微信小程序入口
use Government\Affair\Classes\Wechat;
$user = new Wechat();
$user->ticket($ticket);

UserInfo

//alipay-支付宝入口
//ZhejiangOffice-同源APP入口(含浙里办APP及其他同源适配APP容器环境)
use Government\Affair\Classes\User;
$user = new User();
$user->info($token);
//wechat-微信小程序入口
use Government\Affair\Classes\Wechat;
$user = new Wechat();
$user->info($token);

License

MIT