This repository was archived by the owner on Jan 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff 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
2731Use 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
Original file line number Diff line number Diff line change 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" : [
You can’t perform that action at this time.
0 commit comments