PHP code example of wangshukai / mn-sso-php-sdk

1. Go to this page and download the library: Download wangshukai/mn-sso-php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wangshukai / mn-sso-php-sdk example snippets



#使用分配的key和appSecret 网关地址填写测试或者线上地址  参数相关请参考文档
$config =['appKey' => '', 'appSecret' => '', 'gatewayUrl' => "","jumpUrl"=>''];
$sso = new Sso($config);
$token = $sso->token;//用户相关
$data = [
            'grant_type' => 'authorization_code',
            'code' => 'xxx'
             ];
$res=$token->getToken($data);//token操作
shell
$ composer