PHP code example of a67793581 / sso

1. Go to this page and download the library: Download a67793581/sso 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/ */

    

a67793581 / sso example snippets

 
        $info = $core->set_cookie(array('sign'=>$_POST['username']));//加密需要分发的用户信息并保存到cookie
        $core->login($info);//并发起同步登录请求给全部网站

    //$api_url 为各个网站接口的地址
    private $api_url = array(
        'http://test2.aiku.fun/sso/callback.php',
    );
    //以下3个参数 2个核心类要一致
    //加密用RSA公钥 秘钥格式PKCS#1
    private $public_key = '';

    //加密用RSA私钥 秘钥格式PKCS#1
    private  $private_key = '';


    //code 加密用秘钥
    private $md5_key = '';
$xslt
    //设置服务端code获取用户信息的完整url包含变量名不包含变量值
    private $sso_code_url = 'http://test1.aiku.fun/index.php?code=';
    //以下3个参数 2个核心类要一致
    //加密用RSA公钥 秘钥格式PKCS#1
    private $public_key = '';

    //加密用RSA私钥 秘钥格式PKCS#1
    private  $private_key = '';


    //code 加密用秘钥
    private $md5_key = '';