@uportal/open-id-connect
Advanced tools
Comparing version 1.5.0 to 1.6.0
{ | ||
"name": "@uportal/open-id-connect", | ||
"description": "A shared Open ID Connect authorization helper for uPortal", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"repository": { | ||
@@ -73,5 +73,9 @@ "type": "git", | ||
}, | ||
"jest": { | ||
"testURL": "http://localhost/" | ||
}, | ||
"engines": { | ||
"node": "^6.0.0 || ^8.0.0 || ^10.0.0" | ||
} | ||
}, | ||
"gitHead": "b7a8876e59b22820b2f819214fccc18a7238d1c5" | ||
} |
@@ -68,7 +68,7 @@ # uPortal Open ID Connect | ||
```js | ||
import oicd from '@uportal/open-id-connect'; | ||
import oicd from "@uportal/open-id-connect"; | ||
// with default values | ||
try { | ||
const {encoded, decoded} = await oidc(); | ||
const { encoded, decoded } = await oidc(); | ||
console.log(encoded); | ||
@@ -82,4 +82,4 @@ console.log(decoded); | ||
try { | ||
const {encoded, decoded} = await oidc({ | ||
userInfoApiUrl: '/uPortal/api/v5-1/userinfo', | ||
const { encoded, decoded } = await oidc({ | ||
userInfoApiUrl: "/uPortal/api/v5-1/userinfo", | ||
timeout: 5000, | ||
@@ -103,17 +103,17 @@ propertyTransforms: { | ||
* (optional) **Options** | ||
* (optional) _string_ `userInfoApiUrl` - URL for Open ID Connect endpoint | ||
* (optional) _number_ timeout - time until token should be renewed | ||
* (optional) _object_ propertyTransforms - transforms to apply to specific properties | ||
* _string_ `key` - name of property to be transformed | ||
* _function_ `value` - function to apply to property | ||
* (optional) **Callback** | ||
* _Error_ `err` - null if resonse is okay, error object otherwise | ||
* _Object_ `token` - object with `encoded` and `decoded` keys | ||
* _string_ `encoded` has the raw JSON Web Token | ||
* _Object_ `decoded` has the parsed JSON object | ||
* **Promise** | ||
* _Object_ `resolve` token object | ||
* _string_ `encoded` has the raw JSON Web Token | ||
* _Object_ `decoded` has the parsed JSON object | ||
* _Error_ `reject` reason Promise was rejected | ||
- (optional) **Options** | ||
- (optional) _string_ `userInfoApiUrl` - URL for Open ID Connect endpoint | ||
- (optional) _number_ timeout - time until token should be renewed | ||
- (optional) _object_ propertyTransforms - transforms to apply to specific properties | ||
- _string_ `key` - name of property to be transformed | ||
- _function_ `value` - function to apply to property | ||
- (optional) **Callback** | ||
- _Error_ `err` - null if resonse is okay, error object otherwise | ||
- _Object_ `token` - object with `encoded` and `decoded` keys | ||
- _string_ `encoded` has the raw JSON Web Token | ||
- _Object_ `decoded` has the parsed JSON object | ||
- **Promise** | ||
- _Object_ `resolve` token object | ||
- _string_ `encoded` has the raw JSON Web Token | ||
- _Object_ `decoded` has the parsed JSON object | ||
- _Error_ `reject` reason Promise was rejected |
37634
7