AppSuite:OAuth client management

From Open-Xchange
Revision as of 10:42, 20 October 2015 by Kevin.ruthmann (talk | contribs) (Add remaining clts)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The following command-line tools are available with v7.8.1

createoauthclient

createoauthclient is the tool to create a new OAuth client app.

Parameters

-h,--help Prints a help text
--environment Show info about commandline environment
--nonl Remove all newlines (\n) from output
--responsetimeout <integer> Response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0
-c/--context-group-id <string> The id of the context group
-n/--name <string> The name for the OAuth client app
-d/--description <string> The description for the OAuth client app
-w/--website <string> The client website
-o/--contact-address <string> The contact address for the OAuth client app
-i/--icon-path <string> Path to an image file which acts as a icon for the OAuth client
-s/--default-scope <string> The default scope of the OAuth client
--urls <string> The redirect urls of the OAuth client as a comma-separated list

Extra parameters when authentication is enabled

-A,--adminuser <string> Context admin user name
-P,--adminpass <string> Context admin password

Return value

0 on success

>0 on failure

Mandatory parameters

context-group-id {adminuser adminpass} name description website contact-address icon-path default-scope urls

Command output

On success:

The registration of oauth client was successful

On failure:

The registration of oauth client has failed


enableoauthclient

enableoauthclient is the tool to enable or disable a certain OAuth client app.

Parameters

-h,--help Prints a help text
--environment Show info about commandline environment
--nonl Remove all newlines (\n) from output
--responsetimeout <integer> Response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0
--id <integer> The id of the oauth client
-e, --enable <string> Flag that indicates whether the client should be enabled or disabled (values: 'true' or 'false')

Extra parameters when authentication is enabled

-A,--adminuser <string> Context admin user name
-P,--adminpass <string> Context admin password

Return value

0 on success

>0 on failure

Mandatory parameters

id {adminuser adminpass} enable

Command output

On success:

Enabling the oauth client was successful!

On failure:

Enabling the oauth client has failed!


updateoauthclient

updateoauthclient is the tool to update a certain OAuth client app.

Parameters

Show info about commandline environment
Remove all newlines (\n) from output
Response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0
The id of the oauth client
The id of the context group
The name of the oauth client
The description of the oauth client
The client website
The contact adress of the oauth client
Path to a image file which acts as a icon for the oauth client
The default scope of the oauth client
The redirect urls of the oauth client as a comma separated list

Extra parameters when authentication is enabled

-A,--adminuser <string> Context admin user name
-P,--adminpass <string> Context admin password

Return value

0 on success

>0 on failure

Mandatory parameters

id {adminuser adminpass}

Command output

On success:

The update of oauth client with id XYZ was successful!
The updated oauth client:
Client_ID = id
Name = name
Enabled = true|false
Description = description
Website = url
Contact address = address
Default scope = scope
Redirect URL's = urls
Client's current secret = secret

On failure:

The update of oauth client with id XYZ has failed!


removeoauthclient

removeoauthclient is the tool to remove (unregister) a certain OAuth client app.

Parameters

Show info about commandline environment
Remove all newlines (\n) from output
Response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0
The id of the oauth client

Extra parameters when authentication is enabled

-A,--adminuser <string> Context admin user name
-P,--adminpass <string> Context admin password

Return value

0 on success

>0 on failure

Mandatory parameters

id {adminuser adminpass}

Command output

On success:

The removal of oauth client with id XYZ was successful!

On failure:

The removal of oauth client with id XYZ has failed!


getoauthclient

getoauthclient is the tool to get a certain OAuth client app.

Parameters

Show info about commandline environment
Remove all newlines (\n) from output
Response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0
The id of the oauth client

Extra parameters when authentication is enabled

-A,--adminuser <string> Context admin user name
-P,--adminpass <string> Context admin password

Return value

0 on success

>0 on failure

Mandatory parameters

id {adminuser adminpass}

Command output

On success:

Client_ID = id
Name = name
Enabled = true|false
Description = description
Website = url
Contact address = address
Default scope = scope
Redirect URL's = urls
Client's current secret = secret

On failure:

Client not found!


listoauthclient

listoauthclient is the tool to list all OAuth client apps for a certain context-group-id.

Parameters

Show info about commandline environment
Remove all newlines (\n) from output
Response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0
The id of the context group

Extra parameters when authentication is enabled

-A,--adminuser <string> Context admin user name
-P,--adminpass <string> Context admin password

Return value

0 on success

>0 on failure

Mandatory parameters

context-group-id {adminuser adminpass}

Command output

On success:
Following clients are registered:
Client_ID = id
Name = name
Enabled = true|false
Description = description
Website = url
Contact address = address
Default scope = scope
Redirect URL's = urls
Client's current secret = secret
[...]

On failure:
An empty list.


revokeoauthclient

revokeoauthclient is the tool to revoke the secret of a certain OAuth client app.

Parameters

Show info about commandline environment
Remove all newlines (\n) from output
Response timeout in seconds for reading response from the backend (default 0s; infinite) Available with v7.8.0
The id of the oauth client

Extra parameters when authentication is enabled

-A,--adminuser <string> Context admin user name
-P,--adminpass <string> Context admin password

Return value

0 on success

>0 on failure

Mandatory parameters

id {adminuser adminpass}

Command output

On success:

The revocation of the client's current secret was successfull!
Generated a new secret for following client:
Client_ID = id
Name = name
Enabled = true|false
Description = description
Website = url
Contact address = address
Default scope = scope
Redirect URL's = urls
Client's current secret = secret

On failure:

The revocation of the client's current secret has failed!