Continue refactor
This commit is contained in:
parent
496ce016e3
commit
e56be3c378
10 changed files with 38 additions and 34 deletions
src/oidc_test
|
@ -13,8 +13,6 @@ from pydantic_settings import (
|
|||
)
|
||||
from starlette.requests import Request
|
||||
|
||||
from .models import User
|
||||
|
||||
|
||||
class Resource(BaseModel):
|
||||
"""A resource with an URL that can be accessed with an OAuth2 access token"""
|
||||
|
@ -57,7 +55,7 @@ class AuthProviderSettings(BaseModel):
|
|||
def token_url(self) -> str:
|
||||
return "auth/" + self.id
|
||||
|
||||
def get_account_url(self, request: Request, user: User) -> str | None:
|
||||
def get_account_url(self, request: Request, user: dict) -> str | None:
|
||||
if self.account_url_template:
|
||||
if not (self.url.endswith("/") or self.account_url_template.startswith("/")):
|
||||
sep = "/"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue