Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • C customization simpleSAMLphp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • m4lab_tv1
  • customization simpleSAMLphp
  • Merge requests
  • !17
An error occurred while fetching the assigned milestone of the selected merge_request.

Mlab 208

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Wolfgang Knopki requested to merge MLAB-208 into master 5 years ago
  • Overview 0
  • Commits 4
  • Pipelines 0
  • Changes 1

customize multiauth-appearance and functionality

  • Wolfgang Knopki @knopkiwg merged 5 years ago

    merged

  • Wolfgang Knopki @knopkiwg mentioned in commit a8e2e0cc 5 years ago

    mentioned in commit a8e2e0cc

  • Loading
  • Loading
  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Viewing commit 3193b60c
Prev
Show latest version
1 file
+ 85
- 0

    Preferences

    File browser
    Compare changes
  • 3193b60c
    Wolfgang Knopki
    Add new selectsource.php as bae for multiauth customization · 3193b60c
    Wolfgang Knopki authored 5 years ago
mymodule/themes/fancytheme/multiauth/selectsource.php 0 → 100644
+ 85
- 0
  • View file @ 3193b60c

  • Edit in single-file editor

  • Open in Web IDE

<?php
/**
* This page shows a list of authentication sources. When the user selects
* one of them if pass this information to the
* \SimpleSAML\Module\multiauth\Auth\Source\MultiAuth class and call the
* delegateAuthentication method on it.
*
* @author Lorenzo Gil, Yaco Sistemas S.L.
* @package SimpleSAMLphp
*/
// Retrieve the authentication state
if (!array_key_exists('AuthState', $_REQUEST)) {
throw new \SimpleSAML\Error\BadRequest('Missing AuthState parameter.');
}
$authStateId = $_REQUEST['AuthState'];
/** @var array $state */
$state = \SimpleSAML\Auth\State::loadState($authStateId, \SimpleSAML\Module\multiauth\Auth\Source\MultiAuth::STAGEID);
if (array_key_exists("\SimpleSAML\Auth\Source.id", $state)) {
$authId = $state["\SimpleSAML\Auth\Source.id"];
/** @var \SimpleSAML\Module\multiauth\Auth\Source\MultiAuth $as */
$as = \SimpleSAML\Auth\Source::getById($authId);
} else {
$as = null;
}
$source = null;
if (array_key_exists('source', $_REQUEST)) {
$source = $_REQUEST['source'];
} else {
foreach ($_REQUEST as $k => $v) {
$k = explode('-', $k, 2);
if (count($k) === 2 && $k[0] === 'src') {
$source = base64_decode($k[1]);
}
}
}
if ($source !== null) {
if ($as !== null) {
$as->setPreviousSource($source);
}
\SimpleSAML\Module\multiauth\Auth\Source\MultiAuth::delegateAuthentication($source, $state);
}
if (array_key_exists('multiauth:preselect', $state)) {
$source = $state['multiauth:preselect'];
\SimpleSAML\Module\multiauth\Auth\Source\MultiAuth::delegateAuthentication($source, $state);
}
$globalConfig = \SimpleSAML\Configuration::getInstance();
$t = new \SimpleSAML\XHTML\Template($globalConfig, 'mymodule:selectsource.tpl.php');
$defaultLanguage = $globalConfig->getString('language.default', 'en');
$language = $t->getTranslator()->getLanguage()->getLanguage();
$sources = $state[\SimpleSAML\Module\multiauth\Auth\Source\MultiAuth::SOURCESID];
foreach ($sources as $key => $source) {
$sources[$key]['source64'] = base64_encode($sources[$key]['source']);
if (isset($sources[$key]['text'][$language])) {
$sources[$key]['text'] = $sources[$key]['text'][$language];
} else {
$sources[$key]['text'] = $sources[$key]['text'][$defaultLanguage];
}
if (isset($sources[$key]['help'][$language])) {
$sources[$key]['help'] = $sources[$key]['help'][$language];
} else {
$sources[$key]['help'] = $sources[$key]['help'][$defaultLanguage];
}
}
$t->data['authstate'] = $authStateId;
$t->data['sources'] = $sources;
$t->data['selfUrl'] = $_SERVER['PHP_SELF'];
if ($as !== null) {
$t->data['preferred'] = $as->getPreviousSource();
} else {
$t->data['preferred'] = null;
}
$t->show();
exit();
Assignee
Wolfgang Knopki's avatar
Wolfgang Knopki
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: MLAB-208

Menu

Explore Projects Groups Snippets

Dies ist die Gitlab-Instanz des Transferportals der Hochschule für Technik Stuttgart. Hier geht es zurück zum Portal