Skip to content

A couple of PHP functions designed that encapsulate the env vars that shibboleth SP exposes to the target language

Notifications You must be signed in to change notification settings

umn-asr/php_shib_apache_auth_helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

About

These stupid simple functions are designed to decouple the usage of Shibboleth Native SP exposed $_SERVER variables from the apps that use them. The idea is that your app or higher level auth layer integrate against these functions instead of pulling stuff directly from the $_SERVER array. It assumes that the $_SERVER["REMOTE_USER"] var is exposed by Shibboleth

If you need help getting the Shibboleth Native SP setup on Apache or IIS, check out Shibboleth's Lil Helper, more context about this tool is here.

Usage

<?php 
require_once('php_shib_apache_auth_helpers/shib_functions.php');

if(shib_is_logged_in()) {
  echo 'logged in: ';
  echo shib_internet_id();
} else {
  echo 'not logged in';
  echo "<a href=\"" . shib_login_and_redirect_url() . "\">login</a>";
}
?>

About

A couple of PHP functions designed that encapsulate the env vars that shibboleth SP exposes to the target language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages