title: SimpleSAMLphp Configuration Misconfiguration Error
body: <p>I am installing SAML in PHP using the SimpleSAMLphp extension with ADFS.</p>
  
  <p>I have installed SAML, and I have configured sp and idp, but I am getting an error something like below:</p>
  
  <pre><code>    SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
  
  Backtrace:
  0 /home/aephradmprod/app/httpd/mhtdocs/simplesamlphp/www/module.php:180 (N/A)
  Caused by: Exception: Missing &lt;saml:NameID&gt; or &lt;saml:EncryptedID&gt; in &lt;saml:Subject&gt;.
  Backtrace:
  7 /home/aephradmprod/app/httpd/mhtdocs/simplesamlphp/lib/SAML2/Assertion.php:262 (SAML2_Assertion::parseSubject)
  6 /home/aephradmprod/app/httpd/mhtdocs/simplesamlphp/lib/SAML2/Assertion.php:235 (SAML2_Assertion::__construct)
  5 /home/aephradmprod/app/httpd/mhtdocs/simplesamlphp/lib/SAML2/EncryptedAssertion.php:93 (SAML2_EncryptedAssertion::getAssertion)
  4 /home/aephradmprod/app/httpd/mhtdocs/simplesamlphp/modules/saml/lib/Message.php:355 (sspmod_saml_Message::decryptAssertion)
  3 /home/aephradmprod/app/httpd/mhtdocs/simplesamlphp/modules/saml/lib/Message.php:554 (sspmod_saml_Message::processAssertion)
  2 /home/aephradmprod/app/httpd/mhtdocs/simplesamlphp/modules/saml/lib/Message.php:528 (sspmod_saml_Message::processResponse)
  1 /home/aephradmprod/app/httpd/mhtdocs/simplesamlphp/modules/saml/www/sp/saml2-acs.php:81 (require)
  0 /home/aephradmprod/app/httpd/mhtdocs/simplesamlphp/www/module.php:135 (N/A)
  </code></pre>
  
  <p><strong>config/config.php</strong></p>
  
  <pre><code>&lt;?php
  </code></pre>
  
  <p>/* 
   * The configuration of simpleSAMLphp
   * 
   * $Id: config.php 3246 2013-05-23 11:43:52Z olavmrk $
   */</p>
  
  <p>$config = array (</p>
  
  <pre><code>/**
   * Setup the following parameters to match the directory of your installation.
   * See the user manual for more details.
   *
   * Valid format for baseurlpath is:
   * [(http|https)://(hostname|fqdn)[:port]]/[path/to/simplesaml/]
   * (note that it must end with a '/')
   *
   * The full url format is useful if your simpleSAMLphp setup is hosted behind
   * a reverse proxy. In that case you can specify the external url here.
   *
   * Please note that simpleSAMLphp will then redirect all queries to the
   * external url, no matter where you come from (direct access or via the
   * reverse proxy).
   */
  // 'baseurlpath'           =&gt; 'simplesaml/',
  'baseurlpath'           =&gt; 'https://mydomain/simplesaml/',
  'certdir'               =&gt; 'cert/',
  'loggingdir'            =&gt; 'log/',
  'datadir'               =&gt; 'data/',
  
  /*
   * A directory where simpleSAMLphp can save temporary files.
   *
   * SimpleSAMLphp will attempt to create this directory if it doesn't exist.
   */
  'tempdir'               =&gt; '/tmp/simplesaml',
  
  
  /*
   * If you enable this option, simpleSAMLphp will log all sent and received messages
   * to the log file.
   *
   * This option also enables logging of the messages that are encrypted and decrypted.
   *
   * Note: The messages are logged with the DEBUG log level, so you also need to set
   * the 'logging.level' option to LOG_DEBUG.
   */
  'debug' =&gt; FALSE,
  
  
  'showerrors'            =&gt;  TRUE,
  
  /**
   * Custom error show function called from SimpleSAML_Error_Error::show.
   * See docs/simplesamlphp-errorhandling.txt for function code example.
   *
   * Example:
   *   'errors.show_function' =&gt; array('sspmod_example_Error_Show', 'show'),
   */
  
  /**
   * This option allows you to enable validation of XML data against its
   * schemas. A warning will be written to the log if validation fails.
   */
  'debug.validatexml' =&gt; FALSE,
  
  /**
   * This password must be kept secret, and modified from the default value 123.
   * This password will give access to the installation page of simpleSAMLphp with
   * metadata listing and diagnostics pages.
   * You can also put a hash here; run "bin/pwgen.php" to generate one.
   */
  'auth.adminpassword'        =&gt; 'xxxxxxx',
  'admin.protectindexpage'    =&gt; false,
  'admin.protectmetadata'     =&gt; false,
  
  /**
   * This is a secret salt used by simpleSAMLphp when it needs to generate a secure hash
   * of a value. It must be changed from its default value to a secret value. The value of
   * 'secretsalt' can be any valid string of any length.
   *
   * A possible way to generate a random salt is by running the following command from a unix shell:
   * tr -c -d '0123456789abcdefghijklmnopqrstuvwxyz' &lt;/dev/urandom | dd bs=32 count=1 2&gt;/dev/null;echo
   */
  'secretsalt' =&gt; 'j6fbg3kxmelivp2qmy1uj8y0j8ucp903',
  
  /*
   * Some information about the technical persons running this installation.
   * The email address will be used as the recipient address for error reports, and
   * also as the technical contact in generated metadata.
   */
  'technicalcontact_name'     =&gt; 'Myconnect Admin',
  'technicalcontact_email'    =&gt; 'admin@gmail.com',
  
  /*
   * The timezone of the server. This option should be set to the timezone you want
   * simpleSAMLphp to report the time in. The default is to guess the timezone based
   * on your system timezone.
   *
   * See this page for a list of valid timezones: http://php.net/manual/en/timezones.php
   */
  'timezone' =&gt; 'Asia/Calcutta',
  
  /*
   * Logging.
   * 
   * define the minimum log level to log
   *      SimpleSAML_Logger::ERR      No statistics, only errors
   *      SimpleSAML_Logger::WARNING  No statistics, only warnings/errors
   *      SimpleSAML_Logger::NOTICE   Statistics and errors
   *      SimpleSAML_Logger::INFO     Verbose logs
   *      SimpleSAML_Logger::DEBUG    Full debug logs - not reccomended for production
   * 
   * Choose logging handler.
   * 
   * Options: [syslog,file,errorlog]
   * 
   */
  'logging.level'         =&gt; SimpleSAML_Logger::NOTICE,
  'logging.handler'       =&gt; 'syslog',
  
  /*
   * Choose which facility should be used when logging with syslog.
   *
   * These can be used for filtering the syslog output from simpleSAMLphp into its
   * own file by configuring the syslog daemon.
   *
   * See the documentation for openlog (http://php.net/manual/en/function.openlog.php) for available
   * facilities. Note that only LOG_USER is valid on windows.
   *
   * The default is to use LOG_LOCAL5 if available, and fall back to LOG_USER if not.
   */
  'logging.facility' =&gt; defined('LOG_LOCAL5') ? constant('LOG_LOCAL5') : LOG_USER,
  
  /*
   * The process name that should be used when logging to syslog.
   * The value is also written out by the other logging handlers.
   */
  'logging.processname' =&gt; 'simplesamlphp',
  
  /* Logging: file - Logfilename in the loggingdir from above.
   */
  'logging.logfile'       =&gt; 'simplesamlphp.log',
  
  /* (New) statistics output configuration.
   *
   * This is an array of outputs. Each output has at least a 'class' option, which
   * selects the output.
   */
  'statistics.out' =&gt; array(
      // Log statistics to the normal log.
      /*
      array(
          'class' =&gt; 'core:Log',
          'level' =&gt; 'notice',
      ),
      */
      // Log statistics to files in a directory. One file per day.
      /*
      array(
          'class' =&gt; 'core:File',
          'directory' =&gt; '/var/log/stats',
      ),
      */
  ),
  
  
  /*
   * Enable
   * 
   * Which functionality in simpleSAMLphp do you want to enable. Normally you would enable only 
   * one of the functionalities below, but in some cases you could run multiple functionalities.
   * In example when you are setting up a federation bridge.
   */
  'enable.saml20-idp'     =&gt; true,
  'enable.shib13-idp'     =&gt; false,
  'enable.adfs-idp'       =&gt; true,
  'enable.wsfed-sp'       =&gt; false,
  'enable.authmemcookie' =&gt; false,
  
  
  /*
   * Module enable configuration
   *
   * Configuration to override module enabling/disabling.
   *
   * Example:
   *
   * 'module.enable' =&gt; array(
   *  // Setting to TRUE enables.
   *  'exampleauth' =&gt; TRUE,
   *  // Setting to FALSE disables.
   *  'saml' =&gt; FALSE,
   *  // Unset or NULL uses default.
   *  'core' =&gt; NULL,
   * ),
   *
   */
  
  
  /* 
   * This value is the duration of the session in seconds. Make sure that the time duration of
   * cookies both at the SP and the IdP exceeds this duration.
   */
  'session.duration'      =&gt;  8 * (60*60), // 8 hours.
  
  /*
   * Sets the duration, in seconds, data should be stored in the datastore. As the datastore is used for
   * login and logout requests, thid option will control the maximum time these operations can take.
   * The default is 4 hours (4*60*60) seconds, which should be more than enough for these operations.
   */
  'session.datastore.timeout' =&gt; (4*60*60), // 4 hours
  
  /*
   * Sets the duration, in seconds, auth state should be stored.
   */
  'session.state.timeout' =&gt; (60*60), // 1 hour
  
  /*
   * Option to override the default settings for the session cookie name
   */
  'session.cookie.name' =&gt; 'SimpleSAMLSessionID',
  
  /*
   * Expiration time for the session cookie, in seconds.
   *
   * Defaults to 0, which means that the cookie expires when the browser is closed.
   *
   * Example:
   *  'session.cookie.lifetime' =&gt; 30*60,
   */
  'session.cookie.lifetime' =&gt; 0,
  
  /*
   * Limit the path of the cookies.
   *
   * Can be used to limit the path of the cookies to a specific subdirectory.
   *
   * Example:
   *  'session.cookie.path' =&gt; '/simplesaml/',
   */
  'session.cookie.path' =&gt; '/',
  
  /*
   * Cookie domain.
   *
   * Can be used to make the session cookie available to several domains.
   *
   * Example:
   *  'session.cookie.domain' =&gt; '.example.org',
   */
  'session.cookie.domain' =&gt; NULL,
  
  /*
   * Set the secure flag in the cookie.
   *
   * Set this to TRUE if the user only accesses your service
   * through https. If the user can access the service through
   * both http and https, this must be set to FALSE.
   */
  'session.cookie.secure' =&gt; FALSE,
  
  /*
   * When set to FALSE fallback to transient session on session initialization
   * failure, throw exception otherwise.
   */
  'session.disable_fallback' =&gt; FALSE,
  
  /*
   * Enable secure POST from HTTPS to HTTP.
   *
   * If you have some SP's on HTTP and IdP is normally on HTTPS, this option
   * enables secure POSTing to HTTP endpoint without warning from browser.
   *
   * For this to work, module.php/core/postredirect.php must be accessible
   * also via HTTP on IdP, e.g. if your IdP is on
   * https://idp.example.org/ssp/, then
   * http://idp.example.org/ssp/module.php/core/postredirect.php must be accessible.
   */
  'enable.http_post' =&gt; FALSE,
  
  /*
   * Options to override the default settings for php sessions.
   */
  'session.phpsession.cookiename'  =&gt; null,
  'session.phpsession.savepath'    =&gt; null,
  'session.phpsession.httponly'    =&gt; FALSE,
  
  /*
   * Option to override the default settings for the auth token cookie
   */
  'session.authtoken.cookiename' =&gt; 'SimpleSAMLAuthToken',
  
  /*
   * Languages available, RTL languages, and what language is default
   */
  'language.available'    =&gt; array('en', 'no', 'nn', 'se', 'da', 'de', 'sv', 'fi', 'es', 'fr', 'it', 'nl', 'lb', 'cs', 'sl', 'lt', 'hr', 'hu', 'pl', 'pt', 'pt-br', 'tr', 'ja', 'zh', 'zh-tw', 'ru', 'et', 'he', 'id', 'sr', 'lv'),
  'language.rtl'      =&gt; array('ar','dv','fa','ur','he'),
  'language.default'      =&gt; 'en',
  
  /*
   * Options to override the default settings for the language parameter
   */
  'language.parameter.name'   =&gt; 'language',
  'language.parameter.setcookie'  =&gt; TRUE,
  
  /*
   * Options to override the default settings for the language cookie
   */
  'language.cookie.name'      =&gt; 'language',
  'language.cookie.domain'        =&gt; NULL,
  'language.cookie.path'      =&gt; '/',
  'language.cookie.lifetime'      =&gt; (60*60*24*900),
  
  /**
   * Custom getLanguage function called from SimpleSAML_XHTML_Template::getLanguage().
   * Function should return language code of one of the available languages or NULL.
   * See SimpleSAML_XHTML_Template::getLanguage() source code for more info.
   *
   * This option can be used to implement a custom function for determining
   * the default language for the user.
   *
   * Example:
   *   'language.get_language_function' =&gt; array('sspmod_example_Template', 'getLanguage'),
   */
  
  /*
   * Extra dictionary for attribute names.
   * This can be used to define local attributes.
   *
   * The format of the parameter is a string with &lt;module&gt;:&lt;dictionary&gt;.
   *
   * Specifying this option will cause us to look for modules/&lt;module&gt;/dictionaries/&lt;dictionary&gt;.definition.json
   * The dictionary should look something like:
   *
   * {
   *     "firstattribute": {
   *         "en": "English name",
   *         "no": "Norwegian name"
   *     },
   *     "secondattribute": {
   *         "en": "English name",
   *         "no": "Norwegian name"
   *     }
   * }
   *
   * Note that all attribute names in the dictionary must in lowercase.
   *
   * Example: 'attributes.extradictionary' =&gt; 'ourmodule:ourattributes',
   */
  'attributes.extradictionary' =&gt; NULL,
  
  /*
   * Which theme directory should be used?
   */
  'theme.use'         =&gt; 'default',
  
  
  /*
   * Default IdP for WS-Fed.
   */
  'default-wsfed-idp' =&gt; 'urn:federation:pingfederate:localhost',
  
  /*
   * Whether the discovery service should allow the user to save his choice of IdP.
   */
  'idpdisco.enableremember' =&gt; TRUE,
  'idpdisco.rememberchecked' =&gt; TRUE,
  
  // Disco service only accepts entities it knows.
  'idpdisco.validate' =&gt; TRUE,
  
  'idpdisco.extDiscoveryStorage' =&gt; NULL, 
  
  /*
   * IdP Discovery service look configuration. 
   * Wether to display a list of idp or to display a dropdown box. For many IdP' a dropdown box  
   * gives the best use experience.
   * 
   * When using dropdown box a cookie is used to highlight the previously chosen IdP in the dropdown.  
   * This makes it easier for the user to choose the IdP
   * 
   * Options: [links,dropdown]
   * 
   */
  'idpdisco.layout' =&gt; 'dropdown',
  
  /*
   * Whether simpleSAMLphp should sign the response or the assertion in SAML 1.1 authentication
   * responses.
   *
   * The default is to sign the assertion element, but that can be overridden by setting this
   * option to TRUE. It can also be overridden on a pr. SP basis by adding an option with the
   * same name to the metadata of the SP.
   */
  'shib13.signresponse' =&gt; TRUE,
  
  
  
  /*
   * Authentication processing filters that will be executed for all IdPs
   * Both Shibboleth and SAML 2.0
   */
  'authproc.idp' =&gt; array(
      /* Enable the authproc filter below to add URN Prefixces to all attributes
      10 =&gt; array(
          'class' =&gt; 'core:AttributeMap', 'addurnprefix'
      ), */
      /* Enable the authproc filter below to automatically generated eduPersonTargetedID. 
      20 =&gt; 'core:TargetedID',
      */
  
      // Adopts language from attribute to use in UI
      30 =&gt; 'core:LanguageAdaptor',
  
      /* Add a realm attribute from edupersonprincipalname
      40 =&gt; 'core:AttributeRealm',
       */
      45 =&gt; array(
          'class' =&gt; 'core:StatisticsWithAttribute',
          'attributename' =&gt; 'realm',
          'type' =&gt; 'saml20-idp-SSO',
      ),
  
      /* When called without parameters, it will fallback to filter attributes ‹the old way›
       * by checking the 'attributes' parameter in metadata on IdP hosted and SP remote.
       */
      50 =&gt; 'core:AttributeLimit', 
  
      /* 
       * Search attribute "distinguishedName" for pattern and replaces if found
  
      60 =&gt; array(
          'class'     =&gt; 'core:AttributeAlter',
          'pattern'   =&gt; '/OU=studerende/',
          'replacement'   =&gt; 'Student',
          'subject'   =&gt; 'distinguishedName',
          '%replace', 
      ),
       */
  
      /*
       * Consent module is enabled (with no permanent storage, using cookies).
  
      90 =&gt; array(
          'class'     =&gt; 'consent:Consent', 
          'store'     =&gt; 'consent:Cookie', 
          'focus'     =&gt; 'yes', 
          'checked'   =&gt; TRUE
      ),
       */
      // If language is set in Consent module it will be added as an attribute.
      99 =&gt; 'core:LanguageAdaptor',
  ),
  /*
   * Authentication processing filters that will be executed for all SPs
   * Both Shibboleth and SAML 2.0
   */
  'authproc.sp' =&gt; array(
      /*
      10 =&gt; array(
          'class' =&gt; 'core:AttributeMap', 'removeurnprefix'
      ),
      */
  
      /*
       * Generate the 'group' attribute populated from other variables, including eduPersonAffiliation.
       */
      60 =&gt; array('class' =&gt; 'core:GenerateGroups', 'eduPersonAffiliation'),
      // All users will be members of 'users' and 'members'   
      61 =&gt; array('class' =&gt; 'core:AttributeAdd', 'groups' =&gt; array('users', 'members')),
  
      // Adopts language from attribute to use in UI
      90 =&gt; 'core:LanguageAdaptor',
  
  ),
  
  
  /*
   * This option configures the metadata sources. The metadata sources is given as an array with
   * different metadata sources. When searching for metadata, simpleSAMPphp will search through
   * the array from start to end.
   *
   * Each element in the array is an associative array which configures the metadata source.
   * The type of the metadata source is given by the 'type' element. For each type we have
   * different configuration options.
   *
   * Flat file metadata handler:
   * - 'type': This is always 'flatfile'.
   * - 'directory': The directory we will load the metadata files from. The default value for
   *                this option is the value of the 'metadatadir' configuration option, or
   *                'metadata/' if that option is unset.
   *
   * XML metadata handler:
   * This metadata handler parses an XML file with either an EntityDescriptor element or an
   * EntitiesDescriptor element. The XML file may be stored locally, or (for debugging) on a remote
   * web server.
   * The XML hetadata handler defines the following options:
   * - 'type': This is always 'xml'.
   * - 'file': Path to the XML file with the metadata.
   * - 'url': The url to fetch metadata from. THIS IS ONLY FOR DEBUGGING - THERE IS NO CACHING OF THE RESPONSE.
   *
   *
   * Examples:
   *
   * This example defines two flatfile sources. One is the default metadata directory, the other
   * is a metadata directory with autogenerated metadata files.
   *
   * 'metadata.sources' =&gt; array(
   *     array('type' =&gt; 'flatfile'),
   *     array('type' =&gt; 'flatfile', 'directory' =&gt; 'metadata-generated'),
   *     ),
   *
   * This example defines a flatfile source and an XML source.
   * 'metadata.sources' =&gt; array(
   *     array('type' =&gt; 'flatfile'),
   *     array('type' =&gt; 'xml', 'file' =&gt; 'idp.example.org-idpMeta.xml'),
   *     ),
   *
   *
   * Default:
   * 'metadata.sources' =&gt; array(
   *     array('type' =&gt; 'flatfile')
   *     ),
   */
  'metadata.sources' =&gt; array(
      array('type' =&gt; 'flatfile'),
  ),
  
  
  /*
   * Configure the datastore for simpleSAMLphp.
   *
   * - 'phpsession': Limited datastore, which uses the PHP session.
   * - 'memcache': Key-value datastore, based on memcache.
   * - 'sql': SQL datastore, using PDO.
   *
   * The default datastore is 'phpsession'.
   *
   * (This option replaces the old 'session.handler'-option.)
   */
  'store.type' =&gt; 'phpsession',
  
  
  /*
   * The DSN the sql datastore should connect to.
   *
   * See http://www.php.net/manual/en/pdo.drivers.php for the various
   * syntaxes.
   */
  'store.sql.dsn' =&gt; 'sqlite:/path/to/sqlitedatabase.sq3',
  
  /*
   * The username and password to use when connecting to the database.
   */
  'store.sql.username' =&gt; NULL,
  'store.sql.password' =&gt; NULL,
  
  /*
   * The prefix we should use on our tables.
   */
  'store.sql.prefix' =&gt; 'simpleSAMLphp',
  
  
  /*
   * Configuration for the MemcacheStore class. This allows you to store
   * multiple redudant copies of sessions on different memcache servers.
   *
   * 'memcache_store.servers' is an array of server groups. Every data
   * item will be mirrored in every server group.
   *
   * Each server group is an array of servers. The data items will be
   * load-balanced between all servers in each server group.
   *
   * Each server is an array of parameters for the server. The following
   * options are available:
   *  - 'hostname': This is the hostname or ip address where the
   *    memcache server runs. This is the only required option.
   *  - 'port': This is the port number of the memcache server. If this
   *    option isn't set, then we will use the 'memcache.default_port'
   *    ini setting. This is 11211 by default.
   *  - 'weight': This sets the weight of this server in this server
   *    group. http://php.net/manual/en/function.Memcache-addServer.php
   *    contains more information about the weight option.
   *  - 'timeout': The timeout for this server. By default, the timeout
   *    is 3 seconds.
   *
   * Example of redudant configuration with load balancing:
   * This configuration makes it possible to lose both servers in the
   * a-group or both servers in the b-group without losing any sessions.
   * Note that sessions will be lost if one server is lost from both the
   * a-group and the b-group.
   *
   * 'memcache_store.servers' =&gt; array(
   *     array(
   *         array('hostname' =&gt; 'mc_a1'),
   *         array('hostname' =&gt; 'mc_a2'),
   *     ),
   *     array(
   *         array('hostname' =&gt; 'mc_b1'),
   *         array('hostname' =&gt; 'mc_b2'),
   *     ),
   * ),
   *
   * Example of simple configuration with only one memcache server,
   * running on the same computer as the web server:
   * Note that all sessions will be lost if the memcache server crashes.
   *
   * 'memcache_store.servers' =&gt; array(
   *     array(
   *         array('hostname' =&gt; 'localhost'),
   *     ),
   * ),
   *
   */
  'memcache_store.servers' =&gt; array(
      array(
          array('hostname' =&gt; 'localhost'),
      ),
  ),
  
  
  /*
   * This value is the duration data should be stored in memcache. Data
   * will be dropped from the memcache servers when this time expires.
   * The time will be reset every time the data is written to the
   * memcache servers.
   *
   * This value should always be larger than the 'session.duration'
   * option. Not doing this may result in the session being deleted from
   * the memcache servers while it is still in use.
   *
   * Set this value to 0 if you don't want data to expire.
   *
   * Note: The oldest data will always be deleted if the memcache server
   * runs out of storage space.
   */
  'memcache_store.expires' =&gt;  36 * (60*60), // 36 hours.
  
  
  /*
   * Should signing of generated metadata be enabled by default.
   *
   * Metadata signing can also be enabled for a individual SP or IdP by setting the
   * same option in the metadata for the SP or IdP.
   */
  'metadata.sign.enable' =&gt; FALSE,
  
  /*
   * The default key &amp; certificate which should be used to sign generated metadata. These
   * are files stored in the cert dir.
   * These values can be overridden by the options with the same names in the SP or
   * IdP metadata.
   *
   * If these aren't specified here or in the metadata for the SP or IdP, then
   * the 'certificate' and 'privatekey' option in the metadata will be used.
   * if those aren't set, signing of metadata will fail.
   */
  'metadata.sign.privatekey' =&gt; NULL,
  'metadata.sign.privatekey_pass' =&gt; NULL,
  'metadata.sign.certificate' =&gt; NULL,
  
  
  /*
   * Proxy to use for retrieving URLs.
   *
   * Example:
   *   'proxy' =&gt; 'tcp://proxy.example.com:5100'
   */
  'proxy' =&gt; NULL,
  
  /*
   * Array of URL's to allow a trusted redirect to.
   *
   * Set to NULL to disable.
   *
   * Example:
   *   'redirect.trustedsites' =&gt; array('sp.example.com', 'othersite.org'),
   */
  'redirect.trustedsites' =&gt; NULL,
  </code></pre>
  
  <p>);</p>
  
  <p><strong>config/authsources.php</strong></p>
  
  <pre><code>&lt;?php
  </code></pre>
  
  <p>$config = array(</p>
  
  <pre><code>// This is a authentication source which handles admin authentication.
  'admin' =&gt; array(
      // The default is to use core:AdminPassword, but it can be replaced with
      // any authentication source.
  
      'core:AdminPassword',
  ),
  
  
  // An authentication source which can authenticate against both SAML 2.0
  // and Shibboleth 1.3 IdPs.
  'default-sp' =&gt; array(
      'saml:SP',
      'privatekey'=&gt;'saml.pem',
      'certificate' =&gt;'saml.crt',
  
      //'RelayState' =&gt; 'https://www.google.co.in/',
  
      // The entity ID of this SP.
      // Can be NULL/unset, in which case an entity ID is generated based on the metadata URL.
      'entityID' =&gt; NULL,
  
      // The entity ID of the IdP this should SP should contact.
      // Can be NULL/unset, in which case the user will be shown a list of available IdPs.
       'idp' =&gt; NULL,
      //'idp' =&gt; 'http://adfsfusion.axisbank.com/adfs/services/trust',
  
      // The URL to the discovery service.
      // Can be NULL/unset, in which case a builtin discovery service will be used.
      'discoURL' =&gt; NULL,
      //'NameIDPolicy' =&gt; null,
      'attributes' =&gt; array('SamAccountName','E-MailAddress','Name'),
      'signature.algorithm' =&gt; 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256&amp;#8217;',
      'assertion.encryption' =&gt; true,
  ),
  </code></pre>
  
  <p><strong>metadata/saml20-idp-hosted.php</strong></p>
  
  <pre><code>$metadata['__DYNAMIC:1__'] = array(
      /*
       * The hostname of the server (VHOST) that will use this SAML entity.
       *
       * Can be '__DEFAULT__', to use this entry by default.
       */
      'host' =&gt; '__DEFAULT__',
  
      /* X.509 key and certificate. Relative to the cert directory. */
      'privatekey' =&gt; 'saml.pem',
      'certificate' =&gt; 'saml.crt',
  
      /*
       * Authentication source to use. Must be one that is configured in
       * 'config/authsources.php'.
       */
      'auth' =&gt; 'example-userpass',
  
      /* Uncomment the following to use the uri NameFormat on attributes. */
  
      'attributes.NameFormat' =&gt; 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
      'authproc' =&gt; array(
          // Convert LDAP names to oids.
          100 =&gt; array('class' =&gt; 'core:AttributeMap', 'name2oid'),
      ),
  
  
  );
  </code></pre>
  
  <p><strong>metadata/saml20-sp-remote.php</strong></p>
  
  <pre><code>$metadata['https://example.com/simplesaml/module.php/saml/sp/metadata.php/default-sp'] = array(
      'AssertionConsumerService' =&gt; 'https://example.com/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp',
      //'AssertionConsumerService' =&gt; 'https://adfs.com/adfs/services/trust/mex',
      // 'SingleLogoutService' =&gt; 'https://saml2sp.example.org/simplesaml/module.php/saml/sp/saml2-logout.php/default-sp',
      // 'attributes' =&gt; array('emp_id','emp_name')
  );
  
  /*
  
   */
  $metadata['google.com'] = array(
      'AssertionConsumerService' =&gt; 'https://www.google.com/a/g.feide.no/acs',
      'NameIDFormat' =&gt; 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
      'simplesaml.nameidattribute' =&gt; 'uid',
      'simplesaml.attributes' =&gt; FALSE,
  );
  </code></pre>
  
  <p><strong>metadata/saml20-idp-remote.php</strong></p>
  
  <pre><code>    &lt;?php
  /**
   * SAML 2.0 remote IdP metadata for simpleSAMLphp.
   *
   * Remember to remove the IdPs you don't use from this file.
   *
   * See: https://rnd.feide.no/content/idp-remote-metadata-reference
   */
  
  /*
   * Guest IdP. allows users to sign up and register. Great for testing!
   */
  $metadata['https://adfs-example.com/FederationMetadata/2007-06/FederationMetadata.xml'] = array(
      'name' =&gt; array(
          'en' =&gt; 'Fusion',
          'no' =&gt; 'Feide Gjestebrukere',
      ),
      'description'          =&gt; 'desc',
  
      'SingleSignOnService'  =&gt; 'https://example.com/site/samlLogin',
      // 'SingleLogoutService'  =&gt; 'https://openidp.feide.no/simplesaml/saml2/idp/SingleLogoutService.php',
      'certFingerprint'      =&gt; 'c9ed4dfb07caf13fc21e0fec1572047eb8a7a4cb'
  );
  
  //////////////////////////////////////////// configuration for idp - added by satyawan shinde ///////////
  $metadata['http://adfs-example.com/adfs/services/trust'] = array (
    'entityid' =&gt; 'http://adfs-example.com/adfs/services/trust',
    'contacts' =&gt; 
    array (
      0 =&gt; 
      array (
        'contactType' =&gt; 'support',
        'givenName' =&gt; 'Ganesh',
        'surName' =&gt; 'Chavan',
        'emailAddress' =&gt; 
        array (
          0 =&gt; 'Ganesh.Chavan@example.com',
        ),
        'telephoneNumber' =&gt; 
        array (
          0 =&gt; '1067',
        ),
      ),
    ),
    'metadata-set' =&gt; 'saml20-idp-remote',
    'SingleSignOnService' =&gt; 
    array (
      0 =&gt; 
      array (
        'Binding' =&gt; 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
        'Location' =&gt; 'https://adfs-example.com/adfs/ls/',
      ),
      1 =&gt; 
      array (
        'Binding' =&gt; 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
        'Location' =&gt; 'https://adfs-example.com/adfs/ls/',
      ),
    ),
    'SingleLogoutService' =&gt; 
    array (
      0 =&gt; 
      array (
        'Binding' =&gt; 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
        'Location' =&gt; 'https://adfs-example.com/adfs/ls/',
      ),
      1 =&gt; 
      array (
        'Binding' =&gt; 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
        'Location' =&gt; 'https://adfs-example.com/adfs/ls/',
      ),
    ),
    'ArtifactResolutionService' =&gt; 
    array (
      0 =&gt; 
      array (
        'Binding' =&gt; 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP',
        'Location' =&gt; 'https://adfs-example.com/adfs/services/trust/artifactresolution',
        'index' =&gt; 0,
      ),
    ),
    'keys' =&gt; 
    array (
      0 =&gt; 
      array (
        'encryption' =&gt; true,
        'signing' =&gt; false,
        'type' =&gt; 'X509Certificate',
        'X509Certificate' =&gt; 'ssl charactors',
      ),
      1 =&gt; 
      array (
        'encryption' =&gt; false,
        'signing' =&gt; true,
        'type' =&gt; 'X509Certificate',
        'X509Certificate' =&gt; 'ssl certificate chars',
      ),
    ),
  );
  </code></pre>
  
  <p><strong>here i have been posted all configuration code.</strong></p>
  
  <p>How can I solve this problem?</p>