xjtuana/cas-proxy-client

Cas Proxy Client. PHP version

v1.0.4 2018-09-15 14:45 UTC

This package is auto-updated.

Last update: 2024-05-16 03:20:27 UTC


README

PHP Client for xczh/cas-proxy

Version 对应版本

  • xjtuana/cas-proxy-client-php v1.0 compatible with xczh/cas-proxy v1.1

Usage 使用方法

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;

Related Packages 相关包