Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit a779413

Browse files
authored
Added ROPC readme and screenshot
1 parent d80475f commit a779413

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

samples/ropc/node/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# ROPC
2+
3+
This sample shows how to use the SDK to authenticate a user via Cloud Identity using the the ROPC grant.
4+
5+
<br>
6+
7+
![screenshot](screenshot.png)
8+
9+
## To run the example
10+
11+
In your project folder:
12+
- Create a `.env` file with the following variables in place (remove secret if Public Client):
13+
```
14+
TENANT_URL=https://your-tenant-name.ice.ibmcloud.com
15+
CLIENT_ID=a1b2c3d4-abcd-1234-0000-yourid
16+
CLIENT_SECRET=yoursecret
17+
FLOW_TYPE=ropc
18+
SCOPE=openid
19+
```
20+
21+
From your CLI (Command Line Interface), at the root of your project:
22+
- `npm install`
23+
- `node ropc-sample.js`
24+
- Enter user credentials when prompted
25+
26+
Following successful authentication, authenticated user information will be returned.
27+
28+
## License
29+
30+
The MIT License (MIT)
31+
32+
Copyright (c) 2020 IBM
33+
34+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
35+
36+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
37+
38+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

samples/ropc/node/screenshot.png

205 KB
Loading

0 commit comments

Comments
 (0)