\(\renewcommand\AA{\unicode{x212B}}\)

CatalogLogin v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

Authenticates credentials against a given catalog.

See Also

CatalogLogout, CatalogSearch, CatalogPublish

Properties

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.

Description

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.

Usage

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',FacilityName="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

Source

C++ header: CatalogLogin.h

C++ source: CatalogLogin.cpp