11 lines
467 B
Python
11 lines
467 B
Python
from app.core.contracts import RequestContext
|
|||
|
|
from app.infrastructure.db import SessionFactory
|
||
|
|
from app.repository.identity_repository import IdentityRepository
|
||
|
|
|
||
|
|
|
||
|
|
class IdentityService:
|
||
|
|
async def resolve(self, identity: RequestContext) -> RequestContext:
|
||
|
|
# Fresh RBAC reads make revocation immediate; no stale authorization cache.
|
||
|
|
async with SessionFactory() as session:
|
||
|
|
return await IdentityRepository(session).load_context(identity)
|