tardis.rest.app.security module

class tardis.rest.app.security.BaseUser(*, user_name: str, scopes: Optional[List[str]] = None)[source]

Bases: BaseModel

scopes: Optional[List[str]]
user_name: str
class tardis.rest.app.security.DatabaseUser(*, user_name: str, scopes: Optional[List[str]] = None, hashed_password: str)[source]

Bases: BaseUser

hashed_password: str
class tardis.rest.app.security.LoginUser(*, user_name: str, scopes: Optional[List[str]] = None, password: str)[source]

Bases: BaseUser

password: str
class tardis.rest.app.security.Settings(*, authjwt_secret_key: str = '73fd3ee3066237b00a19d1d035afa2edc26ace2966907d8959f2953d33bc2cf1ec40588a8acfd2247a9925e546b45878fd6dc80ec06d7f695bb7a5bfde21c41303cc610b71159c4e88c20a232ff206ee0dd5afb82894bd72ccafdcdb97682e69937fc1a28988edfd4e58e82e8e273342b7642b5e5e75ce7917ffaa912c2ca0c2', authjwt_token_location: set = {'cookies'}, authjwt_cookie_samesite: str = 'strict', authjwt_cookie_secure: bool = False, authjwt_cookie_csrf_protect: bool = False)[source]

Bases: BaseModel

authjwt_secret_key: str
authjwt_token_location: set
tardis.rest.app.security.check_authentication(user_name: str, password: str) DatabaseUser[source]
tardis.rest.app.security.check_authorization(security_scopes: SecurityScopes, Authorize: AuthJWT = Depends(AuthJWT)) AuthJWT[source]
tardis.rest.app.security.check_scope_permissions(requested_scopes: List[str], allowed_scopes: List[str])[source]
tardis.rest.app.security.get_token_scopes(Authorize: AuthJWT) List[str][source]
tardis.rest.app.security.get_user(user_name: str) Optional[DatabaseUser][source]
tardis.rest.app.security.hash_password(password: str) bytes[source]