Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions message/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Authentication Methods
|Matching | An authentication instance and a matcher callback | Behavior of the underlying authentication method if |
| | | the matcher callback passes |
+----------------+---------------------------------------------------+-----------------------------------------------------+
|Header | Header name and value | Add an arbitrary authentication header |
+----------------+---------------------------------------------------+-----------------------------------------------------+

.. _`Basic Auth`: https://en.wikipedia.org/wiki/Basic_access_authentication
.. _WSSE: http://www.xml.com/pub/a/2003/12/17/dive.html
Expand Down Expand Up @@ -151,6 +153,17 @@ The first argument is an authentication method, the second is a regular expressi
$authentication = Matching::createUrlMatcher(new AuthenticationMethod(), '\/api');


Header
******

With this authentication method you can add arbitrary headers.

In the following example, we are setting a ``X-AUTH-TOKEN`` header with it's value::

use Http\Message\Authentication\Header;

$authentication = new Header('X-AUTH-TOKEN', '9zh987g86fg87gh978hg9g79');

Implement Your Own
^^^^^^^^^^^^^^^^^^

Expand Down