Skip to content
Snippets Groups Projects
Commit 5566544e authored by Laurent's avatar Laurent
Browse files

dev #60742 La Souris Qui Raconte: generate SSO link

parent e90c0377
Branches
Tags
4 merge requests!2334Master,!2239Dev#60742 connecteur sso moissonnage la souris qui raconte,!2228Dev#60742 connecteur sso moissonnage la souris qui raconte,!2226Dev#60742 connecteur sso moissonnage la souris qui raconte
Pipeline #1961 failed with stage
in 12 minutes and 24 seconds
......@@ -24,13 +24,18 @@ class LaSourisQuiRaconte_Config extends Class_DigitalResource_Config {
const LSQR_URL = 'https://www.lasourisquiraconte.com';
public function getConfig() {
return ['Introduction' => $this->_('La souris qui raconte, histoire et contes intéractifs pour enfants'),
return ['Introduction' => $this->_('La Souris Qui Raconte, histoires et contes intéractifs pour enfants'),
'DocTypeLabel' => $this->_('Histoire (La souris qui raconte)'),
'PermissionLabel' => $this->_('Bibliothèque numérique: accéder à La Souris Qui Raconte'),
'AdminVars' => ['TOKEN' => Class_AdminVar_Meta::newDefault($this->_('TOKEN pour le moissonnage des notices La Souris Qui Raconte'))->bePrivate(),
],
'SsoAction' => true,
'Harvesting' => true,
'Mail' => 'f.pretre@lasourisquiraconte.com',
'MailUrl' => 'http://www.lasourisquiraconte.com/offres-pour-les-collectivites',
'HelpLink' => 'http://wiki.bokeh-library-portal.org/index.php/LaSourisQuiRaconte',
'Url' => static::LSQR_URL,
'Icon' => static::LSQR_URL . '/img/la-souris-qui-raconte-logo-1427815138.jpg',
......
<?php
/**
* Copyright (c) 2012-2017, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class LaSourisQuiRaconte_Plugin_AuthController extends Class_DigitalResource_Controller {
public function validateAction() {
$this->getHelper('ViewRenderer')->setNoRender();
$this->_response->setBody(json_encode(['response' => $this->_validateResponse()]));
}
protected function _validateResponse() {
if (!$ticket = $this->_getParam('ticket'))
return ['success' => 'false',
'error' => $this->_('Paramètre ticket non fourni')];
if (!$user = (new Class_CasTicket())->userForTicket($ticket))
return ['success' => 'false',
'error' => $this->_('Ticket invalide')];
if (!$this->_config->hasRightAccess($user))
return ['success' => 'false',
'error' => $this->_('L\'utilisateur n\'est pas autorisé à accéder à cette ressource')];
return ['success' => 'true',
'bibname' => $user->getLibelleBib()];
}
}
\ No newline at end of file
......@@ -129,17 +129,6 @@
"name" : "",
"url" : "http://www.lectura.fr/fr/services/contact.cfm"}
},
"SOURISQUIRACONTE": {
"label" : "La souris qui raconte",
"enabled": "PROVIDER",
"url" : "http://www.lasourisquiraconte.com/",
"image_url" : "http://www.lasourisquiraconte.com/img/la-souris-qui-raconte-logo-1427815138.jpg",
"desc": "Histoires et contes intéractifs pour enfants.",
"features": [],
"sales_contact": {"mail" : "f.pretre@lasourisquiraconte.com",
"name" : "Françoise Prêtre",
"url" : "http://www.lasourisquiraconte.com/offres-pour-les-collectivites"}
},
"MYCOW": {
"label" : "MyCoW",
"enabled": "isMyCowEnabled",
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment