Skip to content
Snippets Groups Projects
Commit 744a0000 authored by Olav Morken's avatar Olav Morken
Browse files

docs: Document getAuthData()-function, and saml-specific authentication data.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2767 44740490-163a-0410-bde0-09ae8108e29a
parent d0a6c7e0
No related branches found
No related tags found
No related merge requests found
...@@ -195,6 +195,23 @@ The attributes will be returned as an associative array with the name of the att ...@@ -195,6 +195,23 @@ The attributes will be returned as an associative array with the name of the att
print('Hello, ' . htmlspecialchars($name)); 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` `getLoginURL`
------------- -------------
......
...@@ -42,6 +42,23 @@ All these parameters override the equivalent option from the configuration. ...@@ -42,6 +42,23 @@ All these parameters override the equivalent option from the configuration.
: *Note*: SAML 2 specific. : *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 Examples
-------- --------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment