BaseAuthorizeHandler¶
- class lsst.ts.authorize.BaseAuthorizeHandler(domain: Domain, log: logging.Logger | None = None, config: types.SimpleNamespace | None = None, callback: Optional[Callable] = None)¶
Bases:
ABC
Methods Summary
handle_authorize_request
(data)Handle an authorize request.
Contact the REST server and request approved, unprocessed authorization request.
Process an authorize request.
start
(sleep_time)stop
()validate_request
(data)Validate a requestAuthorization command by checking the input integrity.
Methods Documentation
- abstract async handle_authorize_request(data: AuthRequestData) → None¶
Handle an authorize request.
- Parameters
- data
AuthRequestData
The data containing the authorize request as described in the corresponding xml file in ts_xml.
- data
- async process_approved_and_unprocessed_auth_requests() → None¶
Contact the REST server and request approved, unprocessed authorization request. Then process those requests by contacting each CSCs and sending the setAuthList command. Finally inform the REST server of the outcome of those commands.
- async process_authorize_request(data: AuthRequestData) → tuple[dict[str, str], set[str]]¶
Process an authorize request. Contact each CSC in the request and send the setAuthList command.
- Parameters
- data
AuthRequestData
The data containing the authorize request as described in the corresponding xml file in ts_xml.
- data
Notes
All CSCs that can be contacted get changed, even if one or more CSCs cannot be contacted.
- async validate_request(data: AuthRequestData) → set[str]¶
Validate a requestAuthorization command by checking the input integrity.
- Parameters
- data
AuthRequestData
Command data.
- data
- Returns
- Raises
- salobj.ExpectedError
If no csc is specified.