Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OIDC authentication to AtoM #1741

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"league/csv": "^9.4",
"jasig/phpcas": "^1.3.8",
"ezyang/htmlpurifier": "^4.13",
"ruflin/elastica": "5.*"
"ruflin/elastica": "5.*",
"jumbojett/openid-connect-php": "^1.0"
},
"autoload-dev": {
"psr-4": {
Expand Down
272 changes: 270 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@
<?php echo __('Have an account?'); ?>
</h6>
</div>
<?php echo $form->renderFormTag(url_for(['module' => 'cas', 'action' => 'login']), ['class' => 'mx-3 my-2']); ?>
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin')) { ?>
<?php echo $form->renderFormTag(url_for(['module' => 'cas', 'action' => 'login']), ['class' => 'mx-3 my-2']); ?>
<?php } elseif ($sf_context->getConfiguration()->isPluginEnabled('arOidcPlugin')) { ?>
<?php echo $form->renderFormTag(url_for(['module' => 'oidc', 'action' => 'login']), ['class' => 'mx-3 my-2']); ?>
<?php } ?>
<?php echo $form->renderHiddenFields(); ?>
<button class="btn btn-sm atom-btn-secondary" type="submit">
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin')) { ?>
<?php echo __('Log in with CAS'); ?>
<?php } elseif ($sf_context->getConfiguration()->isPluginEnabled('arOidcPlugin')) { ?>
<?php echo __('Log in with SSO'); ?>
<?php } ?>
</button>
</form>
</div>
Expand All @@ -30,7 +38,13 @@
</h6>
</li>
<li><?php echo link_to($menuLabels['myProfile'], [$sf_user->user, 'module' => 'user'], ['class' => 'dropdown-item']); ?></li>
<li><?php echo link_to($menuLabels['logout'], ['module' => 'cas', 'action' => 'logout'], ['class' => 'dropdown-item']); ?></li>
<li>
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin')) { ?>
<?php echo link_to($menuLabels['logout'], ['module' => 'cas', 'action' => 'logout'], ['class' => 'dropdown-item']); ?>
<?php } elseif ($sf_context->getConfiguration()->isPluginEnabled('arOidcPlugin')) { ?>
<?php echo link_to($menuLabels['logout'], ['module' => 'oidc', 'action' => 'logout'], ['class' => 'dropdown-item']); ?>
<?php } ?>
</li>
</ul>
</div>
<?php } ?>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin')) { ?>
<?php include '_userMenu.mod_cas.php'; ?>
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin') || $sf_context->getConfiguration()->isPluginEnabled('arOidcPlugin')) { ?>
<?php include '_userMenu.mod_ext_auth.php'; ?>
<?php } else { ?>
<?php include '_userMenu.mod_standard.php'; ?>
<?php } ?>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin')) { ?>
<?php include '_showActions.mod_cas.php'; ?>
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin') || $sf_context->getConfiguration()->isPluginEnabled('arOidcPlugin')) { ?>
<?php include '_showActions.mod_ext_auth.php'; ?>
<?php } else { ?>
<?php include '_showActions.mod_standard.php'; ?>
<?php } ?>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin')) { ?>
<?php include 'editSuccess.mod_cas.php'; ?>
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin') || $sf_context->getConfiguration()->isPluginEnabled('arOidcPlugin')) { ?>
<?php include 'editSuccess.mod_ext_auth.php'; ?>
<?php } else { ?>
<?php include 'editSuccess.mod_standard.php'; ?>
<?php } ?>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin')) { ?>
<?php include 'indexSuccess.mod_cas.php'; ?>
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin') || $sf_context->getConfiguration()->isPluginEnabled('arOidcPlugin')) { ?>
<?php include 'indexSuccess.mod_ext_auth.php'; ?>
<?php } else { ?>
<?php include 'indexSuccess.mod_standard.php'; ?>
<?php } ?>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin')) { ?>
<?php include 'listSuccess.mod_cas.php'; ?>
<?php if ($sf_context->getConfiguration()->isPluginEnabled('arCasPlugin') || $sf_context->getConfiguration()->isPluginEnabled('arOidcPlugin')) { ?>
<?php include 'listSuccess.mod_ext_auth.php'; ?>
<?php } else { ?>
<?php include 'listSuccess.mod_standard.php'; ?>
<?php } ?>
Loading
Loading