\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
Username | Input | string | Mandatory | The username to log into the catalog. |
Password | Input | string | Mandatory | The password of the related username to use. |
FacilityName | Input | string | ISIS | Select a facility to log in to. Allowed values: [‘ISIS’] |
KeepSessionAlive | Input | boolean | True | Keeps the session of the catalog alive if login was successful. |
KeepAlive | Output | IAlgorithm | A handle to the KeepAlive algorithm instance that continues to keep the catalog alive after this algorithm completes. |
This algorithm authenticates the user’s credentials against a specific catalog facility. The catalog is determined from the facility chosen, and is obtained from the config file Facilities.xml.
Example - log a user into the catalog.
# Attempts to authenticate the user against the ISIS catalog.
# When logging into the catalog the session class is returned.
# This can then be used throughout to perform other ICAT routines.
session = CatalogLogin(username='SECRET',password='SECRET',Facility="ISIS")
# View the session ID for this catalog session.
print("The session ID is: {}".format(session.getPropertyValue("Session")))
Output:
The session ID is: b931877c-3cfb-460e-9e88-ed4257020477
Categories: AlgorithmIndex | DataHandling\Catalog
C++ header: CatalogLogin.h (last modified: 2021-03-31)
C++ source: CatalogLogin.cpp (last modified: 2021-03-31)