Skip to content
Snippets Groups Projects
Commit 4e5335bf authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch 'hotline#58461_lien_lekiosk_a_modifier' into 'hotline-master'

hotline #58461 : LeKiosk SSO link maintenance

See merge request !2099
parents d5eb73c8 ae31986f
Branches
Tags
5 merge requests!2334Master,!2102#57574 : correction orthographe des jours de la semaine,!2101Master,!2100Hotline master,!2099hotline #58461 : LeKiosk SSO link maintenance
Pipeline #990 passed with stage
in 18 minutes and 19 seconds
- ticket #58461 : LeKiosk : Maintenance du lien SSO vers la nouvelle plateforme
\ No newline at end of file
......@@ -22,7 +22,7 @@
class Lekiosk_CasLink extends Lekiosk_LinkAbstract {
public function url($album = null) {
return 'https://pro.lekiosk.com/AutentificationCas.aspx?'
return 'https://apipros.lekiosk.com/login/cas?'
. http_build_query(
[
'cas_fournisseur' => Class_Url::absolute(['controller' => 'cas-server-v10'], null, true),
......
......@@ -21,8 +21,8 @@
class Lekiosk_Link extends Lekiosk_LinkAbstract {
const ROOT_URL = 'http://pro.lekiosk.com';
const BASE_URL = '/lekiosque.authenticate.aspx?';
const ROOT_URL = 'https://pros.lekiosk.com';
const BASE_URL = '/login/accesshash?';
const AES_KEY = '56FGH4sTOV9ZXr4Q';
const SHA1_KEY = '897RDZQo789';
......
......@@ -66,7 +66,7 @@ abstract class LeKioskLinkModeLinkTestCase extends ModelTestCase {
class LeKioskLinkModeLinkTest extends LeKioskLinkModeLinkTestCase {
/** @test */
public function urlForMyemailAtLekioskDotComShouldContainsEncryptedEmail() {
$expected = 'http://pro.lekiosk.com/lekiosque.authenticate.aspx?email=1671f18f515f49271985280397c1c2bc48e1bfa31a3b638cb22e510e4953d65e&id=29&AccessHash=e6715cdcc53d6d2b130f4025ea44b67872eb5455';
$expected = 'https://pros.lekiosk.com/login/accesshash?email=1671f18f515f49271985280397c1c2bc48e1bfa31a3b638cb22e510e4953d65e&id=29&AccessHash=4eef094aacc80db2698f841214bba28f8b5d001a';
$this->assertEquals(
$expected,
(new Lekiosk_Link('myemail@lekiosk.com'))->url()
......@@ -76,7 +76,7 @@ class LeKioskLinkModeLinkTest extends LeKioskLinkModeLinkTestCase {
/** @test */
public function withoutMailShouldBeNotContainsEmailKey() {
$expected = 'http://pro.lekiosk.com/lekiosque.authenticate.aspx?email=18ca3d8ad40255ce09d5d20debc1e069&id=29&AccessHash=b78f9cd4198878b85de383ccddd27ab286fc47f6';
$expected = 'https://pros.lekiosk.com/login/accesshash?email=18ca3d8ad40255ce09d5d20debc1e069&id=29&AccessHash=69436bc8e1ea7a85b3a7c9d2d764077e3519a6c5';
$this->assertEquals($expected, (new Lekiosk_Link(''))->url());
}
......@@ -84,7 +84,7 @@ class LeKioskLinkModeLinkTest extends LeKioskLinkModeLinkTestCase {
/** @test */
public function withEmptyUserMailShouldGetSiteOrProfileMail() {
Class_Profil::find(1)->setMailSite('toto@example.com');
$expected = 'http://pro.lekiosk.com/lekiosque.authenticate.aspx?email=76903fe54055ab757db99c2370d89970e25c5b33b5a69cafc108c0031685af88&id=29&AccessHash=c5d56beb8fbd723bc562739cbc3f70ed43a79b9e';
$expected = 'https://pros.lekiosk.com/login/accesshash?email=76903fe54055ab757db99c2370d89970e25c5b33b5a69cafc108c0031685af88&id=29&AccessHash=5db96ac3eb21187f2a7622ebbfa255321c7f32c1';
$this->assertEquals($expected, (new Lekiosk_Link(''))->url());
}
}
......@@ -106,7 +106,7 @@ class LeKioskLinkModeSSOTest extends LeKioskLinkModeLinkTestCase {
/** @test */
public function linkShouldBeCasUrlWithLeKioskId() {
$url = 'https://pro.lekiosk.com/AutentificationCas.aspx?'
$url = 'https://apipros.lekiosk.com/login/cas?'
.'cas_fournisseur=' . urlencode(ROOT_URL . BASE_URL . '/cas-server-v10')
.'&id=29'
.'&ReturnUrl=';
......@@ -150,7 +150,7 @@ class ModulesControllerLeKioskUserWithGroupWithRightCasTest extends AbstractCont
public function shouldHaveAccessToLekioskCas() {
Class_AdminVar::set('Lekiosk_SSO_MODE', 'CAS');
$this->dispatch('/opac/modules/lekiosk', true);
$this->assertContains('https://pro.lekiosk.com/AutentificationCas.aspx',
$this->assertContains('https://apipros.lekiosk.com/login/cas',
$this->_response->getBody());
}
......@@ -158,7 +158,8 @@ class ModulesControllerLeKioskUserWithGroupWithRightCasTest extends AbstractCont
/** @test */
public function shouldHaveAccessToLekiosk() {
$this->dispatch('/opac/modules/lekiosk', true);
$this->assertContains('http://pro.lekiosk.com', $this->_response->getBody());
$this->assertContains('https://pros.lekiosk.com/login/accesshash',
$this->_response->getBody());
}
}
......@@ -405,7 +406,7 @@ class LeKioskRenderAlbumFromRecordTest extends LekioskServiceTestCase {
/** @test */
public function linkCasShouldContainsAlbumSSOUrl() {
$this->_dispatchAlbum();
$url = 'https://pro.lekiosk.com/AutentificationCas.aspx?'
$url = 'https://apipros.lekiosk.com/login/cas?'
.'cas_fournisseur=' . urlencode(ROOT_URL . BASE_URL . '/cas-server-v10')
.'&id=29'
.'&ReturnUrl=Le-10-Sport-National-z1962566.aspx';
......@@ -418,10 +419,10 @@ class LeKioskRenderAlbumFromRecordTest extends LekioskServiceTestCase {
public function linkSSONoCASShouldContainsLekioskSSo() {
Class_AdminVar::set('Lekiosk_SSO_MODE', '');
$this->_dispatchAlbum();
$url = 'http://pro.lekiosk.com/lekiosque.authenticate.aspx?'
$url = 'https://pros.lekiosk.com/login/accesshash?'
. 'email=18ca3d8ad40255ce09d5d20debc1e069'
. '&id=29'
. '&AccessHash=b78f9cd4198878b85de383ccddd27ab286fc47f6'
. '&AccessHash=69436bc8e1ea7a85b3a7c9d2d764077e3519a6c5'
. '&ReturnUrl=Le-10-Sport-National-z1962566.aspx';
$this->assertXPath('//a[@href="' . $url . '"]', $this->_response->getBody());
}
......
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