Debian Codegraph @

docs/usage/security/security-backends.rst

raw
1 =================
2 Security Backends
3 =================
4
5 :class:`~.security.base.AbstractSecurityConfig`
6 -----------------------------------------------
7
8 :doc:`litestar.security </reference/security/index>` includes an :class:`~.security.base.AbstractSecurityConfig`
9 class that serves as a basis for all the security backends offered by Litestar, and is also meant to be used as a
10 basis for custom security backends created by users which you can read more about here:
11 :doc:`/usage/security/abstract-authentication-middleware`
12
13 Session Auth Backend
14 --------------------
15
16 Litestar offers a builtin session auth backend that can be used out of the box with any of the
17 :ref:`session backends <usage/middleware/builtin-middleware:session middleware>` supported by the Litestar session
18 middleware.
19
20 .. dropdown:: Click to see an example of using the session auth backend
21
22 .. literalinclude:: /examples/security/using_session_auth.py
23 :language: python
24 :caption: Using Session Auth
25
26 JWT Auth
27 --------
28
29 Litestar includes several JWT security backends. Check out the
30 :doc:`JWT documentation </usage/security/jwt>` for more details.