|
OpenXPKI::Client::SimpleAn easy to use class to connect to the openxpki daemon and run commands Designed as a kind of CLI interface for inline use within scripts. By default, it will not handle sessions and create a new session using the given auth info on each new instance (subsequent commands within one call are run on the same session). If you pass (and maintain) a session object to the constructor, it is used to persist the backend session during requests.ConstructionThe client is constructed calling the new method, the required configuration can be set via one of three options:Explicit Config Pass the configuration as hash to the new method, must set at least config.socket and config.realm (omit if server has only one realm). The default authentication is anonymous but can be overidden by setting auth.stack and appropriate keys for the chosen login method. An instance of Log4perl can be passed via logger, default is to log to STDERR with loglevel error. Explicit Config from File Pass the name of the config file to use as string to the new method, the file must be in the standard config ini format and have at least a section global providing socket and realm. If an auth section exists, it is mapped as is to the auth parameter. You can set a loglevel and logfile location using log.file and log.level. Loglevel must be a Log4perl Level name without the leading dollar sign (e.g. level=DEBUG). Implicit Config from File If you do not pass a config argument to the new method, the class tries to find a config file at
The same rules as above apply, in case you pass auth or logger as explicit arguments the settings in the file are ignored. handle_workflowCombined method to interact with workflows. Action depends on the parameters given. Return value is always the workflow info structure.Legacy Mode: If arguments are passed with uppercase keys (ID, TYPE, ACTIVITY), the return structure also contains uppercase keys. This is provided for backward compatibility and will be removed with the next major release!
disconnectClose the connection and detach from the communication socket.__reinit_sessionTry to reconnect an existing session. Returns the result of init_session from the underlying client.
Visit the GSP FreeBSD Man Page Interface. |