xjtuana / cas-proxy-client
Cas Proxy Client. PHP version
v1.0.4
2018-09-15 14:45 UTC
Requires
- guzzlehttp/guzzle: ^6.3
README
PHP Client for xczh/cas-proxy
Version 对应版本
xjtuana/cas-proxy-client-php
v1.0 compatible withxczh/cas-proxy
v1.1
Usage 使用方法
- 通过Composer引入包(Packagist)
composer require xjtuana/cas-proxy-client ~1.0
- 示例代码
use Xjtuana\Cas\ProxyClient\ClientV1; use Xjtuana\Cas\ProxyClient\CasProxyClientException; $client = new ClientV1([ 'protocol' => 'https', 'hostname' => 'ana.xjtu.edu.cn', 'prefix' => '/casproxy', ]); try { $user = $client->login(); } catch(CasProxyClientException $e) { echo $e->getMessage(); } echo $user;