Skip to content

Commit c6ae517

Browse files
committed
Add docs for #565
1 parent 430454e commit c6ae517

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/en/authenticators.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,34 @@ After logging in, if the checkbox was checked you should see a ``CookieAuth``
356356
cookie in your browser dev tools. The cookie stores the username field and
357357
a hashed token that is used to reauthenticate later.
358358

359+
Environment Variables
360+
=====================
361+
362+
The ``EnvironmentAuthenticator`` can authenticate users based on mapped
363+
environment variables exposed by the webserver. This enables authentication via
364+
`Shibboleth <https://shibboleth.atlassian.net/wiki/spaces/CONCEPT/overview>`_
365+
and similar SAML 1.1 implementations. An example configuration is::
366+
367+
// Configure a token identifier that maps `USER_ID` to the
368+
// username column
369+
$service->loadIdentifier('Authentication.Token', [
370+
'tokenField' => 'username',
371+
'dataField' => 'USER_NAME',
372+
]);
373+
374+
$service->loadAuthenticator('Authentication.Environment', [
375+
'loginUrl' => '/sso',
376+
'fields' => [
377+
// Choose which environment variables exposed by your
378+
// authentication provider are used to authenticate
379+
// in your application.
380+
'USER_NAME',
381+
],
382+
]);
383+
384+
.. versionadded:: 2.10.0
385+
``EnvironmentAuthenticator`` was added.
386+
359387
Events
360388
======
361389

0 commit comments

Comments
 (0)