2017 © Pedro Peláez
 

library php-simple-cas

A very simple CAS client. Only used to get user.

image

ganlvtech/php-simple-cas

A very simple CAS client. Only used to get user.

  • Thursday, March 2, 2017
  • by ganlvtech
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

php-simple-cas

A very simple CAS client. Only used to get user., (*1)

Installation

composer require ganlvtech/php-simple-cas

Usage

<?php
use PhpSimpleCas\PhpCas;

require './vendor/autoload.php';

$phpCas = new PhpCas('https://cas.xjtu.edu.cn/');

if (isset($_GET['logout'])) {
    $phpCas->logout();
}

if (isset($_GET['login'])) {
    $phpCas->forceAuthentication();
}

$auth = $phpCas->checkAuthentication();
if ($auth) {
    echo $phpCas->getUser();
} else {
    echo 'Guest mode';
}

How to test

Add your service domain to hosts, (*2)

127.0.0.1 service.example.com

LICENSE

The MIT License (MIT)

Copyright (c) 2017 Ganlv

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

The Versions

02/03 2017

dev-master

9999999-dev

A very simple CAS client. Only used to get user.

  Sources   Download

MIT

by Ganlv

cas

02/03 2017

1.0.4

1.0.4.0

A very simple CAS client. Only used to get user.

  Sources   Download

MIT

by Ganlv

cas

02/03 2017

1.0.3

1.0.3.0

A very simple CAS client. Only used to get user.

  Sources   Download

MIT

by Ganlv

cas

02/03 2017

1.0.2

1.0.2.0

A very simple CAS client. Only used to get user.

  Sources   Download

MIT

by Ganlv

cas

02/03 2017

1.0.1

1.0.1.0

A very simple CAS client. Only used to get user.

  Sources   Download

MIT

by Ganlv

cas

02/03 2017

1.0

1.0.0.0

A very simple CAS client. Only used to get user.

  Sources   Download

MIT

by Ganlv

cas