Examples of Shibboleth Usage

Shibboleth Variables

Shibboleth passes several variables relating to the user in the $_SERVER array. The two variables of most use (and used in the example) are:

  • HTTP_SHIB_EP_PRINCIPALNAME
  • (a unique identifier, in the form <userID>@ncl.ac.uk)
  • HTTP_SHIB_EP_EMAILADDRESS or HTTP_SHIB_EMAILADDRESS
  • (your University email address)
  • HTTP_SHIB_PN_SN
  • (your surname)
  • HTTP_SHIB_PN_GIVENNAME
  • (your first name)
  • HTTP_SHIB_EP_STAFFORSTUDENT
  • (whether you are staff or a student)

Examples in PHP

Examples of the code needed to use the Shibboleth variables with a web form (as shown in the example) and with a database are available.