A CLI client to test the PaNOSC Portal API.
The CLI performs an initial login to an IDP to obtain an access token for the Portal API. The config for the IDP goes in config.json with the following structure:
{
"idp": {
"url": "https://idp.com/auth/url/to/obtain/token",
"clientId": "a_client_id"
}
}
The user is requested for a username and password which are passed to the IDP. Having successfully received a token, this is saved locally at .token.json. Following commands verify the validity of the token and refresh it if required. The access token is then forwarded to all portal API requests.
Note: The api-service command is equialent to ./bin/run
$ npm install
$ api-service COMMAND
running command...
$ api-service (-v|--version|version)
api-service-cli-client/1.0.0 darwin-x64 node-v10.15.3
$ api-service --help [COMMAND]
USAGE
$ api-service COMMAND
...
perform user-instance related operations
USAGE
$ api-service user-instance:COMMAND
COMMANDS
user-instance:add Creates a user instance
user-instance:delete Deletes a user instance
user-instance:list List all user instances
display help for api-service
USAGE
$ api-service help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI