update route file for auth and logout

update ufc-cas config url
This commit is contained in:
Emmanuel ROY 2020-12-09 16:37:17 +01:00
parent 7f96f47af8
commit daf4ec7305
7 changed files with 73 additions and 1 deletions

View file

@ -24,7 +24,7 @@ $phpcas_path = '../../source/';
///////////////////////////////////////
// Full Hostname of your CAS Server
$cas_host = 'cas.domain.fr';
$cas_host = 'cas.univ-fcomte.fr';
// Context of the CAS Server
$cas_context = 'cas';
// Port of your CAS server. Normally for a https server it's 443

View file

@ -0,0 +1,27 @@
<?php
// Load the settings from the central config file
require_once CONFIG_PATH . DIRECTORY_SEPARATOR . 'cas-authentification-config-example.php';
// Enable debugging
\phpCAS::setDebug();
// Enable verbose error messages. Disable in production!
\phpCAS::setVerbose(true);
// Initialize phpCAS
\phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
// For production use set the CA certificate that is the issuer of the cert
// on the CAS server and uncomment the line below
// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
// For quick testing you can disable SSL validation of the CAS server.
// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
\phpCAS::setNoCasServerValidation();
// force CAS authentication
\phpCAS::forceAuthentication();
// at this step, the user has been authenticated by the CAS server
// and the user's login name can be read with phpCAS::getUser().
$templateData = array("login"=> \phpCAS::getUser());

View file

@ -0,0 +1,4 @@
<?php
// Load the settings from the central config file
require_once CONFIG_PATH . DIRECTORY_SEPARATOR . 'cas-authentification-config-example.php';
\phpCAS::logout();

View file

@ -0,0 +1,5 @@
name : authentification
page_title : Authentification de l'application
description : zatou stra bracadabla
params : params

View file

@ -0,0 +1,5 @@
name : logout
page_title : Logout de l'application
description : zatou stra bracadabla
params : params

View file

@ -0,0 +1,17 @@
@extends('body')
@section('sidebar')
@parent
<p>This is appended to the master sidebar.</p>
@endsection
@section('content')
<h1>Authentification</h1>
<br /><br /><br />
<a href="{{ \MVC\Classe\Url::link_rewrite(false, 'logout', []) }}">Log out ?</a>
<hr/>
Bonjour, {{$login}}
@endsection

View file

@ -0,0 +1,14 @@
@extends('body')
@section('sidebar')
@parent
<p>This is appended to the master sidebar.</p>
@endsection
@section('content')
<h1>Logout</h1>
<br /><br /><br />
<a href="{{ \MVC\Classe\Url::link_rewrite(false, 'authentification', []) }}">S'authentifier ?</a>
<hr/>
@endsection