pekko/akka-docs/rst/java/http/routing-dsl/directives/security-directives/extractCredentials.rst

17 lines
521 B
ReStructuredText

.. _-extractCredentials-java-:
extractCredentials
==================
Description
-----------
Extracts the potentially present ``HttpCredentials`` provided with the request's ``Authorization`` header,
which can be then used to implement some custom authentication or authorization logic.
See :ref:`credentials-and-timing-attacks-java` for details about verifying the secret.
Example
-------
.. includecode:: ../../../../code/docs/http/javadsl/server/directives/SecurityDirectivesExamplesTest.java#extractCredentials