Skip to content

How to achieve multiple authetication middlewares #3448

Closed Answered by Murtagy
Murtagy asked this question in Q&A
Discussion options

You must be logged in to vote

I think the following acts as I expect, although I am not sure if there is a better way or if I do the thing "by the book".

from typing import Any, Dict, Optional

import msgspec
from typing_extensions import TypeAlias

from litestar.stores.file import FileStore
from litestar import Litestar, Request, get, post, Controller
from litestar.connection import ASGIConnection
from litestar.dto import DTOData, MsgspecDTO
from litestar.exceptions import NotAuthorizedException
from litestar.middleware.session.server_side import ServerSideSessionBackend, ServerSideSessionConfig
from litestar import  Router

from litestar.security.session_auth import SessionAuth
from litestar.testing import TestClien…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Murtagy
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Murtagy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants