From 744a0000eca0da902b076f08f29deda85f61e2bb Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Mon, 7 Mar 2011 13:27:37 +0000 Subject: [PATCH] docs: Document getAuthData()-function, and saml-specific authentication data. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2767 44740490-163a-0410-bde0-09ae8108e29a --- docs/simplesamlphp-sp-api.txt | 17 +++++++++++++++++ modules/saml/docs/sp.txt | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/docs/simplesamlphp-sp-api.txt b/docs/simplesamlphp-sp-api.txt index 07c5a35c3..7ccb2ae53 100644 --- a/docs/simplesamlphp-sp-api.txt +++ b/docs/simplesamlphp-sp-api.txt @@ -195,6 +195,23 @@ The attributes will be returned as an associative array with the name of the att print('Hello, ' . htmlspecialchars($name)); +`getAuthData` +--------------- + + mixed getAuthData(string $name) + +Retrieve the specified authentication data for the current session. +NULL is returned if the user isn't authenticated. + +The available authentication data depends on the module used for authentication. +See the [`saml:SP`](./saml:sp) reference for information about available SAML authentication data. + +### Example + + $idp = $auth->getAuthData('saml:sp:IdP'); + print(You are logged in from: ' . htmlspecialchars($idp)); + + `getLoginURL` ------------- diff --git a/modules/saml/docs/sp.txt b/modules/saml/docs/sp.txt index 9c7bc94f2..f3c94092c 100644 --- a/modules/saml/docs/sp.txt +++ b/modules/saml/docs/sp.txt @@ -42,6 +42,23 @@ All these parameters override the equivalent option from the configuration. : *Note*: SAML 2 specific. +Authentication data +------------------- + +Some SAML-specific attributes are available to the application after authentication. +To retrieve these attributes, the application can use the `getAuthData()`-function from the [SP API](./simplesamlphp-sp-api). +The following attributes are available: + +`saml:sp:IdP` +: The entityID of the IdP the user is authenticated against. + +`saml:sp:NameID` +: The NameID the user was issued by the IdP. + This is an associative array with the various fields from the NameID. + +`saml:sp:SessionIndex` +: The SessionIndex we received from the IdP. + Examples -------- -- GitLab