Skip to content

Commit

Permalink
TestableJinja2Templates no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlundberg committed Mar 13, 2024
1 parent b831782 commit c6bd080
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 45 deletions.
4 changes: 2 additions & 2 deletions src/auth_server/routers/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
from fastapi import APIRouter, BackgroundTasks, Form, HTTPException
from loguru import logger
from starlette.responses import HTMLResponse, RedirectResponse, Response
from starlette.templating import Jinja2Templates

from auth_server.config import load_config
from auth_server.context import ContextRequest, ContextRequestRoute
from auth_server.db.transaction_state import FlowState, TransactionState, get_transaction_state_db
from auth_server.models.gnap import FinishInteractionMethod
from auth_server.templating import TestableJinja2Templates
from auth_server.utils import get_interaction_hash, push_interaction_finish

interaction_router = APIRouter(route_class=ContextRequestRoute, prefix="/interaction")
templates = TestableJinja2Templates(directory=str(Path(__file__).with_name("templates")))
templates = Jinja2Templates(directory=str(Path(__file__).with_name("templates")))


@interaction_router.get("/redirect/{transaction_id}", response_class=HTMLResponse)
Expand Down
4 changes: 2 additions & 2 deletions src/auth_server/routers/saml2_sp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from saml2.metadata import entity_descriptor
from saml2.response import StatusError
from starlette.responses import HTMLResponse, RedirectResponse
from starlette.templating import Jinja2Templates

from auth_server.config import load_config
from auth_server.context import ContextRequest, ContextRequestRoute
Expand All @@ -23,10 +24,9 @@
get_saml2_sp,
process_assertion,
)
from auth_server.templating import TestableJinja2Templates

saml2_router = APIRouter(route_class=ContextRequestRoute, prefix="/saml2")
templates = TestableJinja2Templates(directory=str(Path(__file__).with_name("templates")))
templates = Jinja2Templates(directory=str(Path(__file__).with_name("templates")))


@saml2_router.get("/sp/authn/{transaction_id}", response_class=HTMLResponse)
Expand Down
41 changes: 0 additions & 41 deletions src/auth_server/templating.py

This file was deleted.

0 comments on commit c6bd080

Please sign in to comment.