Back to bricks list
Introduction Version

AuthService

Functions

AUTHENTICATE - @classmethod

Authenticate a user. Return the DB user if ok, throw an exception if not ok

Parameters:
NameTypeDefault valueDescription
idstr The id of the user to authenticate ``
Return type:
User
CHECK_UNIQUE_CODE - @classmethod

Use link the the token to check access for a unique code generated. return the object associated with the code

Parameters:
NameTypeDefault valueDescription
unique_codestr
Return type:
User
CHECK_USER_ACCESS_TOKEN - @classmethod
Parameters:
NameTypeDefault valueDescription
tokenstr Depends(OAuth2UserTokenBearerCookie)
Return type:
User
GENERATE_USER_ACCESS_TOKEN - @classmethod
Parameters:
NameTypeDefault valueDescription
idstr
Return type:
str
GENERATE_USER_TEMP_ACCESS - @classmethod
Parameters:
NameTypeDefault valueDescription
user_login_infoUserLoginInfo
Return type:
str
GET_AND_REFRESH_USER_FROM_SPACE - @classmethod

Check user space exists in the lab and if yes, it updates the user info

Parameters:
NameTypeDefault valueDescription
user_spaceUserSpace
Return type:
User
LOG_USER - @classmethod
Parameters:
NameTypeDefault valueDescription
userUser
responseResponse
Return type:
Response
LOGIN - @classmethod
Parameters:
NameTypeDefault valueDescription
credentialsUserCredentialsDTO
Return type:
Response
LOGIN_WITH_2FA - @classmethod
Parameters:
NameTypeDefault valueDescription
credentialsUserCredentials2Fa
Return type:
Response
LOGOUT - @classmethod
Return type:
JSONResponse
SET_TOKEN_IN_RESPONSE - @classmethod
Parameters:
NameTypeDefault valueDescription
tokenstr
expireInSecondsint
responseResponse