z3c.authviewlet


Namez3c.authviewlet JSON
Version 2.0 PyPI version JSON
download
home_pagehttps://github.com/zopefoundation/z3c.authviewlet
SummaryAuthentication viewlet for Zope3
upload_time2023-02-09 10:37:40
maintainer
docs_urlNone
authorZope Foundation and Contributors
requires_python>=3.7
licenseZPL 2.1
keywords z3c authentication viewlet zope zope3
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            This package provides an authentication viewlet implementation for Zope3.


.. contents::

Login and logout
----------------

Login and logout work both for basic auth and cookie auth.


Setup
~~~~~

The layout page template has to include two content providers (viewlet
mangers):

  - ``login-logout-head`` inside the head tag to get automatic
    redirects and JavaScript code which does the logout for basic
    auth and

  - ``login-logout`` inside the body tag to get login and logout links.

The sample template looks like this:

  >>> import os.path
  >>> template_path = os.path.join(os.path.dirname(__file__), "tests",
  ...     "login-logout-template.pt")
  >>> with open(template_path, "r") as t:
  ...     print(t.read())
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
      <tal:block replace="structure provider:login-logout-head" />
    </head>
    <body>
      <tal:block replace="structure provider:login-logout" />
      <tal:block replace="structure provider:pagelet" />
    </body>
  </html>

This template is registered for the ``IContainer`` interface in
``ftesting.zcml``. After creating a container the template is
used when browsing the container:

  >>> from zope.container.btree import BTreeContainer
  >>> layer.getRootFolder()['container'] = BTreeContainer()

Basic auth
~~~~~~~~~~

When the user is not logged in the login link is displayed:

  >>> from zope.testbrowser.wsgi import Browser
  >>> skinURL = 'http://localhost/++skin++PageletTestSkin/'
  >>> wsgi_app = layer.make_wsgi_app()
  >>> browser = Browser(wsgi_app=wsgi_app)
  >>> browser.handleErrors = False
  >>> browser.open(skinURL + 'container/@@default.html')
  >>> browser.url
  'http://localhost/++skin++PageletTestSkin/container/@@default.html'
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">Login</a>
    </body>
  </html>

Selecting the link leads to the login page, as we use basic auth here,
we get an HTTP error 401 (unauthorized):

  >>> login_url = browser.getLink('Login').url
  >>> browser.raiseHttpErrors = False
  >>> browser.getLink('Login').click()
  >>> print(browser.headers['status'])
  401 Unauthorized
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html

When adding correct credentials we get authorized:

  >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
  >>> browser.open(browser.url)

We are redirected to the page where we selected the login link. After
logging in the login link is no longer displayed. As we did not
specify that logout is supported, no logout link is displayed:

  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@default.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
    </body>
  </html>

Calling the login URL again leads directly to the page referred in nextURL:

  >>> browser.open(login_url)
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@default.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
    </body>
  </html>

Calling the login URL again without the query parameter leeds to a
confirmation page telling that login was successfull:

  >>> browser.open(login_url.split('?')[0])
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@login.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
  <head>
  <title>PageletTestLayout</title>
  </head>
  <body>
    <div>
     <h1>Login successful!</h1>
     <p style="font-size: 200%"> You are now logged in as <em>Manager</em>. </p>
     <a href=".">Back to the main page.</a>
    </div>
  </body>
  </html>

Selecting the ``Back to the main page.`` link send the user back to
the default view of the container. (``ftesting.zcml`` defines
``@@default.html`` as the default view.):

  >>> browser.getLink('Back to the main page.').click()
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
    </body>
  </html>


Providing an ``ILogoutSupported`` adapter leads to a logout link being
displayed:

  >>> import zope.component
  >>> import zope.interface
  >>> import zope.authentication.logout
  >>> import zope.authentication.interfaces
  >>> zope.component.provideAdapter(
  ...     zope.authentication.logout.LogoutSupported,
  ...     adapts=[zope.interface.Interface],
  ...     provides=zope.authentication.interfaces.ILogoutSupported)
  >>> browser.reload()
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">Logout</a>
    </body>
  </html>

Logout is done using JavaScript and a redirect. zope.testbrowser >= 5.0
does not follow redirects if they use the meta tag.

As testbrowser is not able to execute JavaScript the user remains
authenticated:

  >>> logout_url = browser.getLink('Logout').url
  >>> browser.getLink('Logout').click()
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
      <script type="text/javascript"><!--
    // clear HTTP Authentication
    ...
    //-->
  </script>
  <meta http-equiv="refresh"
        content="0;url=http://localhost/++skin++PageletTestSkin/container/@@default.html" />
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@logout.html/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40logout.html">Logout</a>
      <div>
    <h1>You are being redirected!</h1>
    <p style="font-size: 150%">
      <a href="http://localhost/++skin++PageletTestSkin/container/@@default.html">
        If you see this screen for more than 5 seconds, click here.
      </a>
    </p>
  </div>
    </body>
  </html>

Calling the logout URL again after logout (simulated using a new
browser instance) leads directly to the page referred in nextURL:

  >>> browser2 = Browser(logout_url, wsgi_app=wsgi_app)
  >>> print(browser2.url)
  http://localhost/++skin++PageletTestSkin/container/@@default.html
  >>> print(browser2.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">Login</a>
    </body>
  </html>

Calling the logout URL again without the query parameter leeds to a
confirmation page telling that logout was successfull:

  >>> browser2.open(logout_url.split('?')[0])
  >>> print(browser2.url)
  http://localhost/++skin++PageletTestSkin/container/@@logout.html
  >>> print(browser2.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
      <script type="text/javascript"><!--
    // clear HTTP Authentication
    ...
    //-->
  </script>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/logout.html/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40logout.html">Login</a>
      <div>
    <h1>Logout successful!</h1>
    <p style="font-size: 200%">
      You are now logged out.
    </p>
    <a href=".">Back to the main page.</a>
  </div>
    </body>
  </html>


Cookie auth
~~~~~~~~~~~

To do cookie auth we have to set up a pluggable auth utility (PAU)
with a authenticator plug-in (principal folder) first:

  >>> from zope.authentication.interfaces import IAuthentication
  >>> from zope.pluggableauth.interfaces import IAuthenticatorPlugin
  >>> from zope.pluggableauth.authentication import PluggableAuthentication
  >>> from zope.pluggableauth.plugins.principalfolder import PrincipalFolder
  >>> from zope.site import site

  >>> root = layer.getRootFolder()
  >>> root['principal_folder'] = PrincipalFolder()
  >>> sm = root.getSiteManager()
  >>> sm.registerUtility(
  ...     root['principal_folder'], IAuthenticatorPlugin, 'principal_folder')

  >>> root['auth'] = PluggableAuthentication()
  >>> sm.registerUtility(root['auth'], IAuthentication, '')
  >>> root['auth'].credentialsPlugins = (u'Session Credentials',)
  >>> root['auth'].authenticatorPlugins = (u'principal_folder',)

We need a principal inside the principal folder:

  >>> from zope.pluggableauth.plugins.principalfolder import InternalPrincipal
  >>> root['principal_folder']['1'] = InternalPrincipal(
  ...     'tester', 'tpass', 'Tester')


We use a new browser, so the principal is not logged in and the login
link is displayed:

  >>> browser = Browser(wsgi_app=wsgi_app)
  >>> browser.open(skinURL + 'container/@@default.html')
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@default.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">Login</a>
    </body>
  </html>

Selecting the link leads to the login page:

  >>> login_url = browser.getLink('Login').url
  >>> browser.getLink('Login').click()
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/@@loginForm.html?camefrom=http%3A%2F%2Flocalhost%2F%2B%2Bskin%2B%2BPageletTestSkin%2Fcontainer%2F%40%40login.html%3FnextURL%3Dhttp%253A%2F%2Flocalhost%2F%252B%252Bskin%252B%252BPageletTestSkin%2Fcontainer%2F%2540%2540default.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
  <head>
  <title>PageletTestLayout</title>
  </head>
  <body>
    <div>
    <p>
      Please provide Login Information
    </p>
    <form action="" method="post">
      <div class="row">
        <div class="label"><label for="login">User Name</label></div>
        <div class="field">
          <input type="text" name="login" id="login" />
        </div>
      </div>
      <div class="row">
        <div class="label"><label for="password">Password</label></div>
        <div class="field">
          <input type="password" name="password" id="password" />
        </div>
      </div>
      <div class="row">
        <input class="form-element" type="submit"
               name="SUBMIT" value="Log in" />
      </div>
      <input type="hidden" name="camefrom" value="http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">
    </form>
  </div>
  </body>
  </html>

Entering wrong username does not authorize but display an error
message:

  >>> browser.getControl('User Name').value = 'me'
  >>> browser.getControl('Password').value = 'tpass'
  >>> browser.getControl('Log in').click()
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/@@loginForm.html?camefrom=http%3A%2F%2Flocalhost%2F%2B%2Bskin%2B%2BPageletTestSkin%2Fcontainer%2F%40%40login.html%3FnextURL%3Dhttp%253A%2F%2Flocalhost%2F%252B%252Bskin%252B%252BPageletTestSkin%2Fcontainer%2F%2540%2540default.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
  <head>
  <title>PageletTestLayout</title>
  </head>
  <body>
    <div>
    <p>
      Please provide Login Information
    </p>
    <form action="" method="post">
      <div class="row">
        <div class="label"><label for="login">User Name</label></div>
        <div class="field">
          <input type="text" name="login" id="login" />
        </div>
      </div>
      <div class="row">
        <div class="label"><label for="password">Password</label></div>
        <div class="field">
          <input type="password" name="password" id="password" />
        </div>
      </div>
      <div class="row">
        <input class="form-element" type="submit"
               name="SUBMIT" value="Log in" />
      </div>
      <input type="hidden" name="camefrom" value="http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">
    </form>
  </div>
  </body>
  </html>

Entering wrong password does not authorize either:

  >>> browser.getControl('User Name').value = 'tester'
  >>> browser.getControl('Password').value = 'let me in'
  >>> browser.getControl('Log in').click()
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/@@loginForm.html?camefrom=http%3A%2F%2Flocalhost%2F%2B%2Bskin%2B%2BPageletTestSkin%2Fcontainer%2F%40%40login.html%3FnextURL%3Dhttp%253A%2F%2Flocalhost%2F%252B%252Bskin%252B%252BPageletTestSkin%2Fcontainer%2F%2540%2540default.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
  <head>
  <title>PageletTestLayout</title>
  </head>
  <body>
    <div>
    <p>
      Please provide Login Information
    </p>
    <form action="" method="post">
      <div class="row">
        <div class="label"><label for="login">User Name</label></div>
        <div class="field">
          <input type="text" name="login" id="login" />
        </div>
      </div>
      <div class="row">
        <div class="label"><label for="password">Password</label></div>
        <div class="field">
          <input type="password" name="password" id="password" />
        </div>
      </div>
      <div class="row">
        <input class="form-element" type="submit"
               name="SUBMIT" value="Log in" />
      </div>
      <input type="hidden" name="camefrom" value="http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">
    </form>
  </div>
  </body>
  </html>


After entering a correct username and password the user gets
authorized:

  >>> browser.getControl('User Name').value = 'tester'
  >>> browser.getControl('Password').value = 'tpass'
  >>> browser.getControl('Log in').click()

The user gets redirected to the page where he selected the login
link. After logging in the login link is no longer displayed. As we
already specified that logout is supported, a logout link is
displayed:

  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@default.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">Logout</a>
    </body>
  </html>


Calling the login URL again leads directly to the page referred in nextURL:

  >>> browser.open(login_url)
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@default.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">Logout</a>
    </body>
  </html>

Calling the login URL again without the query parameter leeds to a
confirmation page telling that login was successfull:

  >>> browser.open(login_url.split('?')[0])
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@login.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
  <head>
  <title>PageletTestLayout</title>
  </head>
  <body>
    <div>
     <h1>Login successful!</h1>
     <p style="font-size: 200%"> You are now logged in as <em>Tester</em>. </p>
     <a href=".">Back to the main page.</a>
    </div>
  </body>
  </html>

Selecting the ``Back to the main page.`` link send the user back to
the default view of the container. (``ftesting.zcml`` defines
``@@default.html`` as the default view.):

  >>> browser.getLink('Back to the main page.').click()
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">Logout</a>
    </body>
  </html>


Selecting the displayed logout link drops authentication information
and displays a confirmation page, which redirects to the default page
where the login link is displayed again:

  >>> logout_url = browser.getLink('Logout').url
  >>> browser.getLink('Logout').click()
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
      <script type="text/javascript"><!--
    // clear HTTP Authentication
    ...
    //-->
  </script>
  <meta http-equiv="refresh"
        content="0;url=http://localhost/++skin++PageletTestSkin/container/@@default.html" />
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@logout.html/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40logout.html">Logout</a>
      <div>
    <h1>You are being redirected!</h1>
  <BLANKLINE>
    <p style="font-size: 150%">
      <a href="http://localhost/++skin++PageletTestSkin/container/@@default.html">
        If you see this screen for more than 5 seconds, click here.
      </a>
    </p>
  </div>
    </body>
  </html>
  >>> browser.getLink('If you see this screen for more than 5 seconds').click()
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">Login</a>
    </body>
  </html>

Calling the logout URL again after logout leads directly to the page
referred in nextURL:

  >>> browser.open(logout_url)
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@default.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html">Login</a>
    </body>
  </html>

Calling the logout URL again without the query parameter leeds to a
confirmation page telling that logout was successfull:

  >>> browser.open(logout_url.split('?')[0])
  >>> print(browser.url)
  http://localhost/++skin++PageletTestSkin/container/@@logout.html
  >>> print(browser.contents)
  <!DOCTYPE ...>
  <html ...>
    <head>
      <title>PageletTest</title>
      <script type="text/javascript"><!--
    // clear HTTP Authentication
    ...
    //-->
  </script>
    </head>
    <body>
      <a href="http://localhost/++skin++PageletTestSkin/container/logout.html/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40logout.html">Login</a>
      <div>
    <h1>Logout successful!</h1>
    <p style="font-size: 200%">
      You are now logged out.
    </p>
    <a href=".">Back to the main page.</a>
  </div>
    </body>
  </html>

If the parameter ``camefrom`` is used twice, only the first one is actually
used:

  >>> browser.open('http://localhost/++skin++PageletTestSkin/@@loginForm.html?camefrom=first-url&camefrom=second-url')
  >>> print(browser.contents)
  <!DOCTYPE ...>
  ...
      <div class="row">
        <input class="form-element" type="submit" name="SUBMIT" value="Log in" />
      </div>
      <input type="hidden" name="camefrom" value="first-url">
    </form>
  </div>
  </body>
  </html>
  >>> 'second-url' in browser.contents
  False


Changes
-------

2.0 (2023-02-09)
~~~~~~~~~~~~~~~~

- Add support for Python 3.8, 3.9, 3.10, 3.11.

- Drop support for Python 2.7, 3.4, 3.5, 3.6.


1.1 (2018-10-18)
~~~~~~~~~~~~~~~~

- Add support for Python 3.7.


1.0.1 (2017-06-08)
~~~~~~~~~~~~~~~~~~

- Fix dependencies declared in `setup.py`.


1.0 (2017-06-07)
~~~~~~~~~~~~~~~~

- Update to Python 3. Now supporting: Python 3.4 to 3.6, PyPy2 and PyPy3.

- Update the tests to `zope.testbrowser >= 5.0`.


0.8.0 (2010-10-13)
~~~~~~~~~~~~~~~~~~

- Adapted test set up to the changes in `z3c.layer.pagelet` 1.9 thus
  requiring at least this version now.

- Moved code from page template of session credentials login page to view
  class so it can be customized. (Taken from
  `zope.app.authentication.browser.loginform.LoginForm`.) Moved view class
  ``SessionCredentialsLoginForm`` from `z3c.authviewlet.auth` to
  `z3c.authviewlet.session`.

0.7.0 (2009-12-27)
~~~~~~~~~~~~~~~~~~

- Moved files in `z3c.authviewlet.browser` to `z3c.authviewlet` as
  we only have browser code in this package.

- Broke dependency on `zope.app.publisher` by defining our own
  ``ILogin`` interface.

0.6.0 (2009-12-24)
~~~~~~~~~~~~~~~~~~

- Added `i18n domains` to allow translation (done in `z3c.locales` package).

0.5.0 (2009-11-30)
~~~~~~~~~~~~~~~~~~

- Moved authentication viewlet implementation from `z3c.layer.pagelet`
  to this package.

- Initial release.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zopefoundation/z3c.authviewlet",
    "name": "z3c.authviewlet",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "z3c authentication viewlet zope zope3",
    "author": "Zope Foundation and Contributors",
    "author_email": "zope-dev@zope.dev",
    "download_url": "https://files.pythonhosted.org/packages/1d/1d/b08d45b6fba8b645931d364d964d9adf7968f68ed0d473748bc3b7bca6b6/z3c.authviewlet-2.0.tar.gz",
    "platform": null,
    "description": "This package provides an authentication viewlet implementation for Zope3.\n\n\n.. contents::\n\nLogin and logout\n----------------\n\nLogin and logout work both for basic auth and cookie auth.\n\n\nSetup\n~~~~~\n\nThe layout page template has to include two content providers (viewlet\nmangers):\n\n  - ``login-logout-head`` inside the head tag to get automatic\n    redirects and JavaScript code which does the logout for basic\n    auth and\n\n  - ``login-logout`` inside the body tag to get login and logout links.\n\nThe sample template looks like this:\n\n  >>> import os.path\n  >>> template_path = os.path.join(os.path.dirname(__file__), \"tests\",\n  ...     \"login-logout-template.pt\")\n  >>> with open(template_path, \"r\") as t:\n  ...     print(t.read())\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n      <tal:block replace=\"structure provider:login-logout-head\" />\n    </head>\n    <body>\n      <tal:block replace=\"structure provider:login-logout\" />\n      <tal:block replace=\"structure provider:pagelet\" />\n    </body>\n  </html>\n\nThis template is registered for the ``IContainer`` interface in\n``ftesting.zcml``. After creating a container the template is\nused when browsing the container:\n\n  >>> from zope.container.btree import BTreeContainer\n  >>> layer.getRootFolder()['container'] = BTreeContainer()\n\nBasic auth\n~~~~~~~~~~\n\nWhen the user is not logged in the login link is displayed:\n\n  >>> from zope.testbrowser.wsgi import Browser\n  >>> skinURL = 'http://localhost/++skin++PageletTestSkin/'\n  >>> wsgi_app = layer.make_wsgi_app()\n  >>> browser = Browser(wsgi_app=wsgi_app)\n  >>> browser.handleErrors = False\n  >>> browser.open(skinURL + 'container/@@default.html')\n  >>> browser.url\n  'http://localhost/++skin++PageletTestSkin/container/@@default.html'\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">Login</a>\n    </body>\n  </html>\n\nSelecting the link leads to the login page, as we use basic auth here,\nwe get an HTTP error 401 (unauthorized):\n\n  >>> login_url = browser.getLink('Login').url\n  >>> browser.raiseHttpErrors = False\n  >>> browser.getLink('Login').click()\n  >>> print(browser.headers['status'])\n  401 Unauthorized\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\n\nWhen adding correct credentials we get authorized:\n\n  >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')\n  >>> browser.open(browser.url)\n\nWe are redirected to the page where we selected the login link. After\nlogging in the login link is no longer displayed. As we did not\nspecify that logout is supported, no logout link is displayed:\n\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@default.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n    </body>\n  </html>\n\nCalling the login URL again leads directly to the page referred in nextURL:\n\n  >>> browser.open(login_url)\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@default.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n    </body>\n  </html>\n\nCalling the login URL again without the query parameter leeds to a\nconfirmation page telling that login was successfull:\n\n  >>> browser.open(login_url.split('?')[0])\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@login.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n  <head>\n  <title>PageletTestLayout</title>\n  </head>\n  <body>\n    <div>\n     <h1>Login successful!</h1>\n     <p style=\"font-size: 200%\"> You are now logged in as <em>Manager</em>. </p>\n     <a href=\".\">Back to the main page.</a>\n    </div>\n  </body>\n  </html>\n\nSelecting the ``Back to the main page.`` link send the user back to\nthe default view of the container. (``ftesting.zcml`` defines\n``@@default.html`` as the default view.):\n\n  >>> browser.getLink('Back to the main page.').click()\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n    </body>\n  </html>\n\n\nProviding an ``ILogoutSupported`` adapter leads to a logout link being\ndisplayed:\n\n  >>> import zope.component\n  >>> import zope.interface\n  >>> import zope.authentication.logout\n  >>> import zope.authentication.interfaces\n  >>> zope.component.provideAdapter(\n  ...     zope.authentication.logout.LogoutSupported,\n  ...     adapts=[zope.interface.Interface],\n  ...     provides=zope.authentication.interfaces.ILogoutSupported)\n  >>> browser.reload()\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">Logout</a>\n    </body>\n  </html>\n\nLogout is done using JavaScript and a redirect. zope.testbrowser >= 5.0\ndoes not follow redirects if they use the meta tag.\n\nAs testbrowser is not able to execute JavaScript the user remains\nauthenticated:\n\n  >>> logout_url = browser.getLink('Logout').url\n  >>> browser.getLink('Logout').click()\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n      <script type=\"text/javascript\"><!--\n    // clear HTTP Authentication\n    ...\n    //-->\n  </script>\n  <meta http-equiv=\"refresh\"\n        content=\"0;url=http://localhost/++skin++PageletTestSkin/container/@@default.html\" />\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@logout.html/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40logout.html\">Logout</a>\n      <div>\n    <h1>You are being redirected!</h1>\n    <p style=\"font-size: 150%\">\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@default.html\">\n        If you see this screen for more than 5 seconds, click here.\n      </a>\n    </p>\n  </div>\n    </body>\n  </html>\n\nCalling the logout URL again after logout (simulated using a new\nbrowser instance) leads directly to the page referred in nextURL:\n\n  >>> browser2 = Browser(logout_url, wsgi_app=wsgi_app)\n  >>> print(browser2.url)\n  http://localhost/++skin++PageletTestSkin/container/@@default.html\n  >>> print(browser2.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">Login</a>\n    </body>\n  </html>\n\nCalling the logout URL again without the query parameter leeds to a\nconfirmation page telling that logout was successfull:\n\n  >>> browser2.open(logout_url.split('?')[0])\n  >>> print(browser2.url)\n  http://localhost/++skin++PageletTestSkin/container/@@logout.html\n  >>> print(browser2.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n      <script type=\"text/javascript\"><!--\n    // clear HTTP Authentication\n    ...\n    //-->\n  </script>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/logout.html/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40logout.html\">Login</a>\n      <div>\n    <h1>Logout successful!</h1>\n    <p style=\"font-size: 200%\">\n      You are now logged out.\n    </p>\n    <a href=\".\">Back to the main page.</a>\n  </div>\n    </body>\n  </html>\n\n\nCookie auth\n~~~~~~~~~~~\n\nTo do cookie auth we have to set up a pluggable auth utility (PAU)\nwith a authenticator plug-in (principal folder) first:\n\n  >>> from zope.authentication.interfaces import IAuthentication\n  >>> from zope.pluggableauth.interfaces import IAuthenticatorPlugin\n  >>> from zope.pluggableauth.authentication import PluggableAuthentication\n  >>> from zope.pluggableauth.plugins.principalfolder import PrincipalFolder\n  >>> from zope.site import site\n\n  >>> root = layer.getRootFolder()\n  >>> root['principal_folder'] = PrincipalFolder()\n  >>> sm = root.getSiteManager()\n  >>> sm.registerUtility(\n  ...     root['principal_folder'], IAuthenticatorPlugin, 'principal_folder')\n\n  >>> root['auth'] = PluggableAuthentication()\n  >>> sm.registerUtility(root['auth'], IAuthentication, '')\n  >>> root['auth'].credentialsPlugins = (u'Session Credentials',)\n  >>> root['auth'].authenticatorPlugins = (u'principal_folder',)\n\nWe need a principal inside the principal folder:\n\n  >>> from zope.pluggableauth.plugins.principalfolder import InternalPrincipal\n  >>> root['principal_folder']['1'] = InternalPrincipal(\n  ...     'tester', 'tpass', 'Tester')\n\n\nWe use a new browser, so the principal is not logged in and the login\nlink is displayed:\n\n  >>> browser = Browser(wsgi_app=wsgi_app)\n  >>> browser.open(skinURL + 'container/@@default.html')\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@default.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">Login</a>\n    </body>\n  </html>\n\nSelecting the link leads to the login page:\n\n  >>> login_url = browser.getLink('Login').url\n  >>> browser.getLink('Login').click()\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/@@loginForm.html?camefrom=http%3A%2F%2Flocalhost%2F%2B%2Bskin%2B%2BPageletTestSkin%2Fcontainer%2F%40%40login.html%3FnextURL%3Dhttp%253A%2F%2Flocalhost%2F%252B%252Bskin%252B%252BPageletTestSkin%2Fcontainer%2F%2540%2540default.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n  <head>\n  <title>PageletTestLayout</title>\n  </head>\n  <body>\n    <div>\n    <p>\n      Please provide Login Information\n    </p>\n    <form action=\"\" method=\"post\">\n      <div class=\"row\">\n        <div class=\"label\"><label for=\"login\">User Name</label></div>\n        <div class=\"field\">\n          <input type=\"text\" name=\"login\" id=\"login\" />\n        </div>\n      </div>\n      <div class=\"row\">\n        <div class=\"label\"><label for=\"password\">Password</label></div>\n        <div class=\"field\">\n          <input type=\"password\" name=\"password\" id=\"password\" />\n        </div>\n      </div>\n      <div class=\"row\">\n        <input class=\"form-element\" type=\"submit\"\n               name=\"SUBMIT\" value=\"Log in\" />\n      </div>\n      <input type=\"hidden\" name=\"camefrom\" value=\"http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">\n    </form>\n  </div>\n  </body>\n  </html>\n\nEntering wrong username does not authorize but display an error\nmessage:\n\n  >>> browser.getControl('User Name').value = 'me'\n  >>> browser.getControl('Password').value = 'tpass'\n  >>> browser.getControl('Log in').click()\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/@@loginForm.html?camefrom=http%3A%2F%2Flocalhost%2F%2B%2Bskin%2B%2BPageletTestSkin%2Fcontainer%2F%40%40login.html%3FnextURL%3Dhttp%253A%2F%2Flocalhost%2F%252B%252Bskin%252B%252BPageletTestSkin%2Fcontainer%2F%2540%2540default.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n  <head>\n  <title>PageletTestLayout</title>\n  </head>\n  <body>\n    <div>\n    <p>\n      Please provide Login Information\n    </p>\n    <form action=\"\" method=\"post\">\n      <div class=\"row\">\n        <div class=\"label\"><label for=\"login\">User Name</label></div>\n        <div class=\"field\">\n          <input type=\"text\" name=\"login\" id=\"login\" />\n        </div>\n      </div>\n      <div class=\"row\">\n        <div class=\"label\"><label for=\"password\">Password</label></div>\n        <div class=\"field\">\n          <input type=\"password\" name=\"password\" id=\"password\" />\n        </div>\n      </div>\n      <div class=\"row\">\n        <input class=\"form-element\" type=\"submit\"\n               name=\"SUBMIT\" value=\"Log in\" />\n      </div>\n      <input type=\"hidden\" name=\"camefrom\" value=\"http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">\n    </form>\n  </div>\n  </body>\n  </html>\n\nEntering wrong password does not authorize either:\n\n  >>> browser.getControl('User Name').value = 'tester'\n  >>> browser.getControl('Password').value = 'let me in'\n  >>> browser.getControl('Log in').click()\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/@@loginForm.html?camefrom=http%3A%2F%2Flocalhost%2F%2B%2Bskin%2B%2BPageletTestSkin%2Fcontainer%2F%40%40login.html%3FnextURL%3Dhttp%253A%2F%2Flocalhost%2F%252B%252Bskin%252B%252BPageletTestSkin%2Fcontainer%2F%2540%2540default.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n  <head>\n  <title>PageletTestLayout</title>\n  </head>\n  <body>\n    <div>\n    <p>\n      Please provide Login Information\n    </p>\n    <form action=\"\" method=\"post\">\n      <div class=\"row\">\n        <div class=\"label\"><label for=\"login\">User Name</label></div>\n        <div class=\"field\">\n          <input type=\"text\" name=\"login\" id=\"login\" />\n        </div>\n      </div>\n      <div class=\"row\">\n        <div class=\"label\"><label for=\"password\">Password</label></div>\n        <div class=\"field\">\n          <input type=\"password\" name=\"password\" id=\"password\" />\n        </div>\n      </div>\n      <div class=\"row\">\n        <input class=\"form-element\" type=\"submit\"\n               name=\"SUBMIT\" value=\"Log in\" />\n      </div>\n      <input type=\"hidden\" name=\"camefrom\" value=\"http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">\n    </form>\n  </div>\n  </body>\n  </html>\n\n\nAfter entering a correct username and password the user gets\nauthorized:\n\n  >>> browser.getControl('User Name').value = 'tester'\n  >>> browser.getControl('Password').value = 'tpass'\n  >>> browser.getControl('Log in').click()\n\nThe user gets redirected to the page where he selected the login\nlink. After logging in the login link is no longer displayed. As we\nalready specified that logout is supported, a logout link is\ndisplayed:\n\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@default.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">Logout</a>\n    </body>\n  </html>\n\n\nCalling the login URL again leads directly to the page referred in nextURL:\n\n  >>> browser.open(login_url)\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@default.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">Logout</a>\n    </body>\n  </html>\n\nCalling the login URL again without the query parameter leeds to a\nconfirmation page telling that login was successfull:\n\n  >>> browser.open(login_url.split('?')[0])\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@login.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n  <head>\n  <title>PageletTestLayout</title>\n  </head>\n  <body>\n    <div>\n     <h1>Login successful!</h1>\n     <p style=\"font-size: 200%\"> You are now logged in as <em>Tester</em>. </p>\n     <a href=\".\">Back to the main page.</a>\n    </div>\n  </body>\n  </html>\n\nSelecting the ``Back to the main page.`` link send the user back to\nthe default view of the container. (``ftesting.zcml`` defines\n``@@default.html`` as the default view.):\n\n  >>> browser.getLink('Back to the main page.').click()\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">Logout</a>\n    </body>\n  </html>\n\n\nSelecting the displayed logout link drops authentication information\nand displays a confirmation page, which redirects to the default page\nwhere the login link is displayed again:\n\n  >>> logout_url = browser.getLink('Logout').url\n  >>> browser.getLink('Logout').click()\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n      <script type=\"text/javascript\"><!--\n    // clear HTTP Authentication\n    ...\n    //-->\n  </script>\n  <meta http-equiv=\"refresh\"\n        content=\"0;url=http://localhost/++skin++PageletTestSkin/container/@@default.html\" />\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@logout.html/@@logout.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40logout.html\">Logout</a>\n      <div>\n    <h1>You are being redirected!</h1>\n  <BLANKLINE>\n    <p style=\"font-size: 150%\">\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@default.html\">\n        If you see this screen for more than 5 seconds, click here.\n      </a>\n    </p>\n  </div>\n    </body>\n  </html>\n  >>> browser.getLink('If you see this screen for more than 5 seconds').click()\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">Login</a>\n    </body>\n  </html>\n\nCalling the logout URL again after logout leads directly to the page\nreferred in nextURL:\n\n  >>> browser.open(logout_url)\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@default.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40default.html\">Login</a>\n    </body>\n  </html>\n\nCalling the logout URL again without the query parameter leeds to a\nconfirmation page telling that logout was successfull:\n\n  >>> browser.open(logout_url.split('?')[0])\n  >>> print(browser.url)\n  http://localhost/++skin++PageletTestSkin/container/@@logout.html\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  <html ...>\n    <head>\n      <title>PageletTest</title>\n      <script type=\"text/javascript\"><!--\n    // clear HTTP Authentication\n    ...\n    //-->\n  </script>\n    </head>\n    <body>\n      <a href=\"http://localhost/++skin++PageletTestSkin/container/logout.html/@@login.html?nextURL=http%3A//localhost/%2B%2Bskin%2B%2BPageletTestSkin/container/%40%40logout.html\">Login</a>\n      <div>\n    <h1>Logout successful!</h1>\n    <p style=\"font-size: 200%\">\n      You are now logged out.\n    </p>\n    <a href=\".\">Back to the main page.</a>\n  </div>\n    </body>\n  </html>\n\nIf the parameter ``camefrom`` is used twice, only the first one is actually\nused:\n\n  >>> browser.open('http://localhost/++skin++PageletTestSkin/@@loginForm.html?camefrom=first-url&camefrom=second-url')\n  >>> print(browser.contents)\n  <!DOCTYPE ...>\n  ...\n      <div class=\"row\">\n        <input class=\"form-element\" type=\"submit\" name=\"SUBMIT\" value=\"Log in\" />\n      </div>\n      <input type=\"hidden\" name=\"camefrom\" value=\"first-url\">\n    </form>\n  </div>\n  </body>\n  </html>\n  >>> 'second-url' in browser.contents\n  False\n\n\nChanges\n-------\n\n2.0 (2023-02-09)\n~~~~~~~~~~~~~~~~\n\n- Add support for Python 3.8, 3.9, 3.10, 3.11.\n\n- Drop support for Python 2.7, 3.4, 3.5, 3.6.\n\n\n1.1 (2018-10-18)\n~~~~~~~~~~~~~~~~\n\n- Add support for Python 3.7.\n\n\n1.0.1 (2017-06-08)\n~~~~~~~~~~~~~~~~~~\n\n- Fix dependencies declared in `setup.py`.\n\n\n1.0 (2017-06-07)\n~~~~~~~~~~~~~~~~\n\n- Update to Python 3. Now supporting: Python 3.4 to 3.6, PyPy2 and PyPy3.\n\n- Update the tests to `zope.testbrowser >= 5.0`.\n\n\n0.8.0 (2010-10-13)\n~~~~~~~~~~~~~~~~~~\n\n- Adapted test set up to the changes in `z3c.layer.pagelet` 1.9 thus\n  requiring at least this version now.\n\n- Moved code from page template of session credentials login page to view\n  class so it can be customized. (Taken from\n  `zope.app.authentication.browser.loginform.LoginForm`.) Moved view class\n  ``SessionCredentialsLoginForm`` from `z3c.authviewlet.auth` to\n  `z3c.authviewlet.session`.\n\n0.7.0 (2009-12-27)\n~~~~~~~~~~~~~~~~~~\n\n- Moved files in `z3c.authviewlet.browser` to `z3c.authviewlet` as\n  we only have browser code in this package.\n\n- Broke dependency on `zope.app.publisher` by defining our own\n  ``ILogin`` interface.\n\n0.6.0 (2009-12-24)\n~~~~~~~~~~~~~~~~~~\n\n- Added `i18n domains` to allow translation (done in `z3c.locales` package).\n\n0.5.0 (2009-11-30)\n~~~~~~~~~~~~~~~~~~\n\n- Moved authentication viewlet implementation from `z3c.layer.pagelet`\n  to this package.\n\n- Initial release.\n",
    "bugtrack_url": null,
    "license": "ZPL 2.1",
    "summary": "Authentication viewlet for Zope3",
    "version": "2.0",
    "split_keywords": [
        "z3c",
        "authentication",
        "viewlet",
        "zope",
        "zope3"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "533a1afaed5467746d685fc91e8aa0a94c1f6676d8cd50cebe0fa3c08d0b32df",
                "md5": "af73512f97d033607fe225765f29fbe3",
                "sha256": "f833cd503bbc8aa0bc39a0a1cb830964c039cf9c3ad67659ce64843e91b6866a"
            },
            "downloads": -1,
            "filename": "z3c.authviewlet-2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "af73512f97d033607fe225765f29fbe3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 19972,
            "upload_time": "2023-02-09T10:37:38",
            "upload_time_iso_8601": "2023-02-09T10:37:38.371926Z",
            "url": "https://files.pythonhosted.org/packages/53/3a/1afaed5467746d685fc91e8aa0a94c1f6676d8cd50cebe0fa3c08d0b32df/z3c.authviewlet-2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d1db08d45b6fba8b645931d364d964d9adf7968f68ed0d473748bc3b7bca6b6",
                "md5": "14ef6fdbf25c79be59d16232090f03a9",
                "sha256": "e502d2e45956339400e4402325bad8d768e146680ea2f5e4449709cf8d589dd4"
            },
            "downloads": -1,
            "filename": "z3c.authviewlet-2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "14ef6fdbf25c79be59d16232090f03a9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 19591,
            "upload_time": "2023-02-09T10:37:40",
            "upload_time_iso_8601": "2023-02-09T10:37:40.067305Z",
            "url": "https://files.pythonhosted.org/packages/1d/1d/b08d45b6fba8b645931d364d964d9adf7968f68ed0d473748bc3b7bca6b6/z3c.authviewlet-2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-09 10:37:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "zopefoundation",
    "github_project": "z3c.authviewlet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "z3c.authviewlet"
}
        
Elapsed time: 0.56972s