<h1 tal:replace="structure here/manage_page_header"> PAGE HEADER </h1>
<h2 tal:replace="structure here/manage_tabs"> PAGE HEADER </h2>

<h3> Session identifier management</h3>

<div class="form-help">
    <p> You may use either a shared secret or the plone.keyring ring of five secrets
        (shared with the plone.protect CSRF protection framework.)
    </p>
    <p>The following properties may be set through the Properties tab:
    </p>
    <dl>
      <dt>Cookie validity timeout (in seconds)</dt>
      <dd>After this, the session is invalid and the user must login again. Set to 0
          for the cookie to remain valid indefinitely. Note that when the user
          folder has caching enabled, cookie validity may not be checked on every
          request.</dd>

      <dt>Use mod_auth_tkt compatible hashing algorithm</dt>
      <dd>Compatibility with other implemenations, but at the cost of using a weaker
          hashing algorithm.</dd>

      <dt>Cookie name</dt>
      <dd>Which cookie to use. This must also be set on the
          `credentials_cookie_auth`` plugin.</dd>

      <dt>Cookie lifetime (in days)</dt>
      <dd>This makes the cookie persistent across opening and closing the browser.</dd>

      <dt>Cookie domain</dt>
      <dd>A cookie may be shared across www1.example.com and www2.example.com by
          setting the cookie domain to ``.example.com``. (blank for the user's current domain)</dd>

      <dt>Cookie path</dt>
      <dd>What path the cookie is set valid (defaults to ``/``.)</dd>
  </dl>

</div>

<h3>Shared secret <span tal:condition="context/haveSharedSecret">(enabled)</span></h3>

<p>
To enable logins between sites or other mod_auth_tkt systems, set the shared secret.
</p>
<form method="post" action="." tal:attributes="action string:${context/absolute_url}">

    <label for="shared_secret">Shared secret:</label>
    <input type="text" name="shared_secret" value="" autocomplete="off" size="50"/>
    <input type="submit" name="manage_setSharedSecret:method" value="Set shared secret" /><br/>
    <input tal:replace="structure context/@@authenticator/authenticator" />
</form>


<form method="post" action="." tal:attributes="action string:${context/absolute_url}" tal:condition="context/haveSharedSecret">
    <p>
    To use the plone.keyring secrets, remove the shared secret.
    </p>
    <input type="submit" name="manage_removeSharedSecret:method" value="Remove shared secret"/>
    <input tal:replace="structure context/@@authenticator/authenticator" />
</form>

<h3>plone.keyring secrets <span tal:condition="not:context/haveSharedSecret">(enabled)</span></h3>

<p>
This implementation uses a ring of five secrets: one of them is used to
generate new session identifiters, the others are older signing secrets which
are still considerd to be valid.
</p>

<h4>Invalidate all session identifiers</h4>
<p>
By clicking the button below you clear all secrets used to validate sessions.
This will immediately log out all users who use session authentication and
require them to log in again.
</p>
<form method="post" action="." tal:attributes="action string:${context/absolute_url}">
    <input type="submit" name="manage_clearSecrets:method" value="Clear secrets"/>
    <input tal:replace="structure context/@@authenticator/authenticator" />
</form>

<h4>Create a new (signing) secret</h4>
<p>
By clicking the button below a new signing secret will be created and added
to the ring. This will remove the oldest secret from the ring if there already
were five secrets present.
</p>
<form method="post" action="." tal:attributes="action string:${context/absolute_url}">
    <input type="submit" name="manage_createNewSecret:method" value="New secret"/>
    <input tal:replace="structure context/@@authenticator/authenticator" />
</form>


<h1 tal:replace="structure here/manage_page_footer"> PAGE FOOTER </h1>
