Back to bricks list
Introduction Getting Started
Architecture
Technical Documentation
Other Classes
AbstractDbManager AgentFactory AudioView AuthService BadRequestException BarPlotView Base BaseEnvShell BaseHTTPException BaseModelDTO BaseTestCase BaseTestCaseLight BashCodeParam BoolParam BoolRField BoolValidator BoxPlotView BrickMigration BrickService CheckBeforeTaskResult CommunityService Compress CondaShellProxy Config ConfigParams Connector ConnectorPartSpec ConnectorSpec ConverterRunner Credentials CredentialsDataBasic CredentialsDataLab CredentialsDataOther CredentialsDataS3 CredentialsParam CredentialsType CurrentUserService Dashboard DashboardType DataframeAggregatorHelper DataframeDataFilterHelper DataframeFilterHelper DataFrameRField DataframeScalerHelper datetime DateTimeUTC DbConfig DictRField DictValidator DispatchedMessage DynamicInputs DynamicOutputs EntityNavigator EntityNavigatorNote EntityNavigatorResource EntityNavigatorScenario EntityNavigatorService EntityNavigatorView EntityTag EntityType Enum ExceptionHandler ExceptionResponse ExpressionBuilder ExternalApiService ExternalSpaceCreateFolder FileDownloader FileHelper FileRField FloatParam FloatRField FloatValidator ForbiddenException FrontService FrontTheme FSNodeModel FsNodeService GwsCorePackages GWSException GzipCompress HeatmapView HistogramView ImageView InPort Inputs InputSpec InputSpecs InterfaceSpec IntParam IntRField IntValidator IO IOface Job JsonCodeParam JSONField JSONView JuliaCodeParam KVStore LazyViewParam LinePlot2DView ListParam ListRField ListValidator Logger LoggerMessageObserver MailService MambaShellProxy MessageDispatcher MessageLevel MessageObserver Model ModelRfield ModelService Monitor MonitorService MultiViews NetworkView Note Notebook NoteParam NoteSearchBuilder NoteService NoteTemplate NoteTemplateParam NoteTemplateService NotFoundException NumericHelper NumericParam NumericValidator OpenAiChat OpenAiChatMessage OpenAiChatParam OpenAiHelper OutPort Outputs OutputSpec OutputSpecs PackageHelper Paginator ParamSet ParamSpec PerlCodeParam PipShellProxy PlotlyRField PlotlyView PoolDb Port PrimitiveRField Process ProcessFactory ProcessModel ProcessProxy ProcessSpec ProgressBar ProgressBarMessageObserver ProgressBarService ProtocolModel ProtocolProxy ProtocolService ProtocolTyping PythonCodeParam Queue QueueService RCodeParam Requests ResourceDownloaderBase ResourceModel ResourceOrigin ResourceRField ResourceSearchBuilder ResourceService ResourceTransfertService ResourceTyping RField RichText RichTextBlock RichTextBlockModificationDTO RichTextBlockModificationWithUserDTO RichTextBlockType RichTextDTO RichTextFigureData RichTextFileData RichTextFormulaData RichTextListData RichTextListItem RichTextModificationDifferenceDTO RichTextModificationsDTO RichTextModificationType RichTextNoteResourceViewData RichTextObjectType RichTextParagraphData RichTextParagraphHeaderData RichTextParagraphHeaderLevel RichTextParagraphListData RichTextParagraphListItemData RichTextParagraphText RichTextResourceViewData RichTextTimestampData RichTextUserDTO RichTextVariableData RichTextView RichTextViewFileData S3Bucket ScatterPlot2DView Scenario ScenarioCreationType ScenarioProcessStatus ScenarioProxy ScenarioRunService ScenarioSaveDTO ScenarioSearchBuilder ScenarioService ScenarioStatus ScenarioTemplate ScenarioTemplateFactory ScenarioTransfertService SearchBuilder SerializableObjectJson SerializableRField Settings ShellProxy ShellProxyFactory SimpleTextView SpaceFolder SpaceService SqlMigrator StackedBarPlotView StreamlitApp StreamlitAppManager StreamlitProcess StringHelper StrParam StrRField StrValidator SysProc TableAnnotatorHelper TableColumnSelector TableColumnTagToRowExtractor TableColumnTagUnfolder TableConcatHelper TableHeaderInfo TableOperationHelper TableRowSelector TableRowTagToColumnExtractor TableRowTagUnfolder TableScalerHelper TableTagAggregatorHelper TableUnfolderHelper TableView TabularView Tag TagHelper TagKeyModel TagList TagService TagsParam TagValueModel TarCompress TarGzCompress TaskFileDownloader TaskHelper TaskInputs TaskModel TaskProxy TaskRunner TaskService TaskTyping TechnicalInfo TextParam TextView TextViewData Typing TypingDeprecated TypingIconColor TypingIconType TypingManager TypingStyle UnauthorizedException URLValidator User UserCredentialsDTO UserGroup UserService Utils UUIDRField Validator VennDiagramView Version View ViewConfig ViewTester ViewType YamlCodeParam ZipCompress
Version

AuthService

Functions
AUTHENTICATE - @classmethod

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

Parameters:
NameTypeDefault valueDescription
id_str
Return type:
User
AUTHENTICATE_FROM_TOKEN - @classmethod
Parameters:
NameTypeDefault valueDescription
tokenstr
Return type:
User
AUTHENTICATE_USER_IF_TOKEN_PROVIDED - @classmethod

Method for public route to authenticate user if token provided If not, the user is not authenticated and the method return None but no exception is raised

:raises UnauthorizedException: description

Parameters:
NameTypeDefault valueDescription
requestRequest
Return type:
gws_core.user.user.User | None
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
requestRequest
Return type:
User
GENERATE_USER_ACCESS_TOKEN - @classmethod
Parameters:
NameTypeDefault valueDescription
id_str
Return type:
str
GENERATE_USER_TEMP_ACCESS - @classmethod
Parameters:
NameTypeDefault valueDescription
user_login_infoUserLoginInfo
Return type:
str
GET_AND_CHECK_TOKEN_FROM_REQUEST - @classmethod
Parameters:
NameTypeDefault valueDescription
requestRequest
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
GET_TOKEN_FROM_REQUEST - @classmethod
Parameters:
NameTypeDefault valueDescription
requestRequest
Return type:
str | None
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