@asgardeo/javascript 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +12 -7
- package/dist/cjs/index.js.map +2 -2
- package/dist/index.js +12 -7
- package/dist/index.js.map +2 -2
- package/dist/utils/processOpenIDScopes.d.ts +7 -2
- package/package.json +1 -1
|
@@ -21,16 +21,21 @@
|
|
|
21
21
|
* If the input is an array, it joins the elements into a single string separated by spaces.
|
|
22
22
|
* If the input is neither, it throws an error.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* Default scopes are only injected when no scopes are configured (undefined, empty string,
|
|
25
|
+
* or empty array). If the caller explicitly provides scopes, those are used as-is.
|
|
26
|
+
*
|
|
27
|
+
* @param scopes - The OpenID scopes to process, which can be a string, an array of strings,
|
|
28
|
+
* or undefined/null when not configured.
|
|
25
29
|
* @returns A string of OpenID scopes separated by spaces.
|
|
26
30
|
*
|
|
27
31
|
* @example
|
|
28
32
|
* ```typescript
|
|
29
33
|
* processOpenIDScopes("openid profile email"); // returns "openid profile email"
|
|
30
34
|
* processOpenIDScopes(["openid", "profile", "email"]); // returns "openid profile email"
|
|
35
|
+
* processOpenIDScopes(undefined); // returns default scopes
|
|
31
36
|
* processOpenIDScopes(123); // throws AsgardeoRuntimeError
|
|
32
37
|
* processOpenIDScopes({}); // throws AsgardeoRuntimeError
|
|
33
38
|
* ```
|
|
34
39
|
*/
|
|
35
|
-
declare const processOpenIDScopes: (scopes: string | string[]) => string;
|
|
40
|
+
declare const processOpenIDScopes: (scopes: string | string[] | undefined | null) => string;
|
|
36
41
|
export default processOpenIDScopes;
|