title: Add custom attributes to response with simplesaml
body: <p>I'm setting up simplesaml as an IdP to do some testing for my SP. I need to add one new attribute to the response which is {sp_name}Access. However, I don't know where to add them.</p>
  
  <p>I've tried adding the following to <code>saml20-idp-hosted.php</code></p>
  
  <pre><code>'authproc' =&gt; array(
     50 =&gt; array(
         'class' =&gt; 'core:AttributeAdd',
         '{sp_name}Access' =&gt; '{sp_name}Access',
     ),
   )
  </code></pre>
  
  <p>And in my <code>authsources.php</code> I have this</p>
  
  <pre><code>'test-users' =&gt; array(
      'exampleauth:UserPass',
      'user1:user1pass' =&gt; array(
          'uid' =&gt; array('1'),
          'eduPersonAffiliation' =&gt; array('group1'),
          'email' =&gt; 'user1@example.com',
          'givenName' =&gt; 'User',
          'surname' =&gt; 'One',
          '{sp_name}Access =&gt; true
      ),
  ),
  </code></pre>
  
  <p>However it gives me this error</p>
  
  <pre><code>Backtrace:
  1 www/_include.php:45 (SimpleSAML_exception_handler)
  0 [builtin] (N/A)
  Caused by: Exception: Invalid attributes for user user1 in authentication source test-users: Invalid attribute value for attribute loopioAccess: "1".
  Backtrace:
  6 modules/exampleauth/lib/Auth/Source/UserPass.php:55 (sspmod_exampleauth_Auth_Source_UserPass::__construct)
  5 lib/SimpleSAML/Auth/Source.php:302 (SimpleSAML_Auth_Source::parseAuthSource)
  4 lib/SimpleSAML/Auth/Source.php:343 (SimpleSAML_Auth_Source::getById)
  3 lib/SimpleSAML/Auth/Simple.php:56 (SimpleSAML\Auth\Simple::getAuthSource)
  2 lib/SimpleSAML/Auth/Simple.php:160 (SimpleSAML\Auth\Simple::login)
  1 modules/core/www/authenticate.php:36 (require)
  0 www/module.php:135 (N/A)
  </code></pre>
  
  <p>Any ideas how to actually add a custom attribute? I'm very new to simplesaml so I'm not sure if there's anything else I need to do to make this work.</p>