update all imports in source files: fastapi_oidc_op → porchlight
This commit is contained in:
parent
48f4e8ba73
commit
14037117e7
12 changed files with 26 additions and 26 deletions
|
|
@ -10,16 +10,16 @@ from fastapi.staticfiles import StaticFiles
|
|||
from fastapi.templating import Jinja2Templates
|
||||
from starlette.middleware.sessions import SessionMiddleware
|
||||
|
||||
from fastapi_oidc_op.authn.password import PasswordService
|
||||
from fastapi_oidc_op.authn.routes import router as authn_router
|
||||
from fastapi_oidc_op.authn.webauthn import WebAuthnService
|
||||
from fastapi_oidc_op.config import Settings, StorageBackend
|
||||
from fastapi_oidc_op.invite.service import MagicLinkService
|
||||
from fastapi_oidc_op.manage.routes import router as manage_router
|
||||
from fastapi_oidc_op.oidc.endpoints import router as oidc_router
|
||||
from fastapi_oidc_op.oidc.provider import create_oidc_server
|
||||
from fastapi_oidc_op.store.sqlite.migrations import run_migrations
|
||||
from fastapi_oidc_op.store.sqlite.repositories import (
|
||||
from porchlight.authn.password import PasswordService
|
||||
from porchlight.authn.routes import router as authn_router
|
||||
from porchlight.authn.webauthn import WebAuthnService
|
||||
from porchlight.config import Settings, StorageBackend
|
||||
from porchlight.invite.service import MagicLinkService
|
||||
from porchlight.manage.routes import router as manage_router
|
||||
from porchlight.oidc.endpoints import router as oidc_router
|
||||
from porchlight.oidc.provider import create_oidc_server
|
||||
from porchlight.store.sqlite.migrations import run_migrations
|
||||
from porchlight.store.sqlite.repositories import (
|
||||
SQLiteCredentialRepository,
|
||||
SQLiteMagicLinkRepository,
|
||||
SQLiteUserRepository,
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from fido2.webauthn import (
|
|||
PublicKeyCredentialType,
|
||||
)
|
||||
|
||||
from fastapi_oidc_op.models import User
|
||||
from fastapi_oidc_op.userid import generate_unique_userid
|
||||
from porchlight.models import User
|
||||
from porchlight.userid import generate_unique_userid
|
||||
|
||||
router = APIRouter(tags=["authn"])
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# src/fastapi_oidc_op/config.py
|
||||
# src/porchlight/config.py
|
||||
from enum import StrEnum
|
||||
|
||||
from pydantic_settings import BaseSettings
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from fastapi import HTTPException, Request
|
||||
|
||||
from fastapi_oidc_op.store.protocols import (
|
||||
from porchlight.store.protocols import (
|
||||
CredentialRepository,
|
||||
MagicLinkRepository,
|
||||
UserRepository,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import secrets
|
||||
from datetime import UTC, datetime, timedelta
|
||||
|
||||
from fastapi_oidc_op.models import MagicLink
|
||||
from fastapi_oidc_op.store.protocols import MagicLinkRepository
|
||||
from porchlight.models import MagicLink
|
||||
from porchlight.store.protocols import MagicLinkRepository
|
||||
|
||||
|
||||
class MagicLinkService:
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ from fastapi import APIRouter, Form, Request, Response
|
|||
from fastapi.responses import HTMLResponse, JSONResponse, RedirectResponse
|
||||
from fido2.webauthn import PublicKeyCredentialDescriptor, PublicKeyCredentialType
|
||||
|
||||
from fastapi_oidc_op.dependencies import get_session_user
|
||||
from fastapi_oidc_op.models import PasswordCredential, WebAuthnCredential
|
||||
from porchlight.dependencies import get_session_user
|
||||
from porchlight.models import PasswordCredential, WebAuthnCredential
|
||||
|
||||
router = APIRouter(prefix="/manage", tags=["manage"])
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
from idpyoidc.server.user_info import UserInfo
|
||||
|
||||
from fastapi_oidc_op.models import User
|
||||
from porchlight.models import User
|
||||
|
||||
|
||||
def user_to_claims(user: User) -> dict:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from fastapi import APIRouter, Request, Response
|
|||
from fastapi.responses import HTMLResponse, JSONResponse, RedirectResponse
|
||||
from idpyoidc.time_util import utc_time_sans_frac
|
||||
|
||||
from fastapi_oidc_op.oidc.claims import PorchlightUserInfo, user_to_claims
|
||||
from porchlight.oidc.claims import PorchlightUserInfo, user_to_claims
|
||||
|
||||
router = APIRouter(tags=["oidc"])
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ from pathlib import Path
|
|||
|
||||
from idpyoidc.server import Server
|
||||
|
||||
from fastapi_oidc_op.config import Settings
|
||||
from fastapi_oidc_op.oidc.claims import PorchlightUserInfo
|
||||
from porchlight.config import Settings
|
||||
from porchlight.oidc.claims import PorchlightUserInfo
|
||||
|
||||
|
||||
def _build_server_config(settings: Settings) -> dict:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Protocol, runtime_checkable
|
||||
|
||||
from fastapi_oidc_op.models import (
|
||||
from porchlight.models import (
|
||||
MagicLink,
|
||||
PasswordCredential,
|
||||
User,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ from datetime import UTC, datetime
|
|||
|
||||
import aiosqlite
|
||||
|
||||
from fastapi_oidc_op.models import MagicLink, PasswordCredential, User, WebAuthnCredential
|
||||
from fastapi_oidc_op.store.exceptions import DuplicateError
|
||||
from porchlight.models import MagicLink, PasswordCredential, User, WebAuthnCredential
|
||||
from porchlight.store.exceptions import DuplicateError
|
||||
|
||||
|
||||
class SQLiteUserRepository:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import secrets
|
|||
|
||||
from proquint import uint2quint
|
||||
|
||||
from fastapi_oidc_op.store.protocols import UserRepository
|
||||
from porchlight.store.protocols import UserRepository
|
||||
|
||||
|
||||
def generate_userid() -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue