-
-
Notifications
You must be signed in to change notification settings - Fork 503
Expand file tree
/
Copy pathsettings_example.php
More file actions
54 lines (46 loc) · 1.68 KB
/
settings_example.php
File metadata and controls
54 lines (46 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* SAMPLE Code to demonstrate how provide SAML settings.
*
* The settings are contained within a OneLogin_Saml_Settings object. You need to
* provide, at a minimum, the following things:
*
* - idpSingleSignOnUrl
* This is the URL to forward to for auth requests.
* It will be provided by your IdP.
*
* - idpSingleLogOutUrl
* This is the URL to forward to for logout requests.
* It will be provided by your IdP.
*
* - idpPublicCertificate
* This is a certificate required to authenticate your request.
* This certificate should be provided by your IdP.
*
* - spReturnUrl
* The URL that the IdP should redirect to once the authorization is complete.
* You must provide this, and it should point to the consume.php script or its equivalent.
*
* - spIssuer
* The identifier of your SP
*
* - requestedNameIdFormat
* The format how must be returned the nameID
*
*/
require_once '../_toolkit_loader.php';
require_once '../compatibility.php';
$settings = new OneLogin_Saml_Settings();
// When using Service Provider Initiated SSO (starting at index.php), this URL asks the IdP to authenticate the user.
$settings->idpSingleSignOnUrl = '';
// Initiate the SLO process, This URL asks the IdP to SLO the user.
$settings->idpSingleLogOutUrl = '';
// The certificate for the users account in the IdP
$settings->idpPublicCertificate = '';
// The URL where to the SAML Response/SAML Assertion will be posted
$settings->spReturnUrl = '';
// Name of this application
$settings->spIssuer = '';
// Tells the IdP to return the email address of the current user
$settings->requestedNameIdFormat = OneLogin_Saml_Settings::NAMEID_EMAIL_ADDRESS;
return $settings;