Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Commit

Permalink
docs(readme): edited scim user cli
Browse files Browse the repository at this point in the history
  • Loading branch information
imShakil committed Apr 17, 2021
1 parent 6204ff3 commit 7b40cab
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 8 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/a0f9313eeef046c8810e153a6b7b4ff5)](https://www.codacy.com/gh/JanssenProject/jans-cli/dashboard?utm_source=github.com&utm_medium=referral&utm_content=JanssenProject/jans-cli&utm_campaign=Badge_Grade)

# _Janssen Command Line Interface_
`jans-cli` is a **Command Line Interface** for Janssen Configuration. It also has `menu-driven` interface that makes easier to understand how to use [Janssen Server](https://github.com/JanssenProject/home) through the Interactive Mode.
`jans-cli` is a **Command Line Interface** for Janssen Configuration. It also has `menu-driven` interface that makes it easier to understand how to use [Janssen Server](https://github.com/JanssenProject/home) through the Interactive Mode.

# _Installation_

Expand All @@ -10,23 +10,24 @@ of the [Janssen Server](https://github.com/JanssenProject/home).

![](docs/img/jans-config-api.png)

After successfully installed Janssen Server, you will get two command line arguments as below:
After successfully installed Janssen Server, you will get two command-line arguments as below:

![](docs/img/installed.png)

# _Quick Start_

As you have seen, CLI supports both of `config-cli` and `scim-cli`. For a quick start, let's run the following command.
As you have seen, CLI supports both of the `config-cli` and `scim-cli`. For a quick start, let's run the following command.

```
/opt/jans/jans-cli/config-cli.py
```
If you get any error then you can try this way:
If you get an error, you can try in this way:

```
python3 /opt/jans/jans-cli/config-cli.py
```

Alternatively, you can make python3 as a default version:
Alternatively, you can make python3 to default version:
```
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
/opt/jans/jans-cli/config-cli.py
Expand All @@ -36,7 +37,7 @@ You will get a menu as below image:

![main-menu.png](docs/img/im-main.png)

From the following list you can choose any option by selecting its number. For example, let's say number 2,
From the following list, you can choose any options by selecting its number. For example, let's say number 2,
to get **Default Authentication Method**.

That returns another two options as below:
Expand All @@ -47,4 +48,4 @@ Now selecting 1 and it returns our desired result as below image:

![default-authentication-method.png](docs/img/im-cur-default-auth.png)

So, It was a quick start to view how this _jans-cli_ Interactive Mode really works. Please, follow this [link](docs) to read _jans-cli_ docs for better understanding of Janssen Command Line.
So, That was a quick start to view how this `_jans-cli_` Interactive Mode works. Please, follow this [link](docs) to read the `_jans-cli_` docs for a better understanding of the Janssen Command-Line.
75 changes: 74 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Using jans-cli

`jans-cli` is automatically installed if you choose to install **jans-config-api** during the installation of the Janssen Server. `jans-cli` has two modes of operation
`jans-cli` is automatically installed if you choose to install **jans-config-api** during the installation of the Janssen Server. `jans-cli` has two modes of operation:

1. Menu-driven Interactive Mode
2. Command Line Argument Mode

Expand Down Expand Up @@ -7496,6 +7497,57 @@ Finally use below command line, to create an user resources.
```

It will generate user `inum` value, metadata and will be added in user resources:

```
Getting access token for scope https://jans.io/scim/users.write
Server Response:
{
"externalId": null,
"userName": "mhosen",
"name": {
"familyName": "mobarak",
"givenName": "mobarak",
"middleName": null,
"honorificPrefix": null,
"honorificSuffix": null,
"formatted": "mobarak mobarak"
},
"displayName": "mobarak",
"nickName": null,
"profileUrl": null,
"title": "Vice President",
"userType": "Contractor",
"preferredLanguage": "en",
"locale": "en-US",
"timezone": "America/Los_Angeles",
"active": true,
"password": null,
"emails": null,
"phoneNumbers": null,
"ims": null,
"photos": null,
"addresses": null,
"groups": null,
"entitlements": null,
"roles": null,
"x509Certificates": null,
"urn:ietf:params:scim:schemas:extension:gluu:2.0:User": null,
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": "7034663f-dc43-4f8c-8074-e8e75cae9c96",
"meta": {
"resourceType": "User",
"created": "2021-04-17T14:54:30.430Z",
"lastModified": "2021-04-17T14:54:30.430Z",
"location": "https://testjans.gluu.org/jans-scim/restv1/v2/Users/7034663f-dc43-4f8c-8074-e8e75cae9c96"
}
}
root@testjans:~#
```

### Group

Group resources are used to manage user resources easily with some operations.
Expand Down Expand Up @@ -7781,3 +7833,24 @@ root@testjans:~#
}
}
```
4. **_update-group-by-id_**:

If we look at the description

```
Operation ID: update-group-by-id
Description: Updates a Group resource (see section 3.5.1 of RFC 7644).
Update works in a replacement fashion: every attribute
value found in the payload sent will replace the one in
the existing resource representation. Attributes not passed in the
payload will be left intact.
url-suffix: id
Parameters:
attributes: A comma-separated list of attribute names to return in the response [string]
excludedAttributes: When specified, the response will contain a default set of attributes minus those listed here (as a comma-separated list) [string]
id: No description is provided for this parameter [string]
Schema: /components/schemas/GroupResource
```


0 comments on commit 7b40cab

Please sign in to comment.