Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit 62fba57

Browse files
csantanaprJason Peterson
authored andcommitted
update readme for getAuthHeader reference wrong getToken (#2)
* update readme for getAuthHeader reference wrong getToken Closes #1 * bump patch version to 1.0.1
1 parent 942636b commit 62fba57

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,22 @@ const m = new itm({
1919
})
2020
```
2121

22-
Use the function `getToken` to get an IAM token. This function returns a `Promise`.
22+
Use the function `getToken` to get an IAM acess token. This function returns a `Promise`.
2323
```javascript
24-
m.getToken().then(token => console.log(token))
24+
m.getToken().then(token => console.log('Authorization:', 'Bearer', token))
25+
```
26+
output:
27+
```bash'
28+
Authorization: Bearer eyJhbGciOiJIUz......sgrKIi8hdFs
2529
```
2630

2731
Use the function `getAuthHeader` to get a Bearer HTTP Authorization header including the token. This function returns a `Promise`.
2832
```javascript
29-
m.getToken().then(header => console.log(header))
33+
m.getAuthHeader().then(header => console.log('Authorization:', header))
34+
```
35+
output:
36+
```bash
37+
Authorization: Bearer eyJhbGciOiJIUz......sgrKIi8hdFs
3038
```
3139

3240
## Using with OpenWhisk client library

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ibm-functions/iam-token-manager",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Helper library to handle IBM Cloud IAM Tokens",
55
"main": "index.js",
66
"files": [

0 commit comments

Comments
 (0)