@forgerock/sdk-oidc 1.2.0 → 2.0.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/coverage/base.css +224 -0
  3. package/coverage/block-navigation.js +87 -0
  4. package/coverage/coverage-final.json +5 -0
  5. package/coverage/favicon.png +0 -0
  6. package/coverage/index.html +131 -0
  7. package/coverage/prettify.css +1 -0
  8. package/coverage/prettify.js +2 -0
  9. package/coverage/sort-arrow-sprite.png +0 -0
  10. package/coverage/sorter.js +210 -0
  11. package/coverage/src/index.html +116 -0
  12. package/coverage/src/index.ts.html +115 -0
  13. package/coverage/src/lib/authorize.effects.ts.html +265 -0
  14. package/coverage/src/lib/index.html +146 -0
  15. package/coverage/src/lib/state-pkce.effects.ts.html +274 -0
  16. package/coverage/src/lib/wellknown.effects.ts.html +475 -0
  17. package/dist/src/index.d.ts +3 -2
  18. package/dist/src/index.d.ts.map +1 -1
  19. package/dist/src/index.js +9 -2
  20. package/dist/src/lib/authorize.effects.d.ts +1 -1
  21. package/dist/src/lib/authorize.effects.d.ts.map +1 -1
  22. package/dist/src/lib/authorize.effects.js +4 -2
  23. package/dist/src/lib/state-pkce.effects.d.ts +2 -7
  24. package/dist/src/lib/state-pkce.effects.d.ts.map +1 -1
  25. package/dist/src/lib/state-pkce.effects.js +7 -1
  26. package/dist/src/lib/wellknown.effects.d.ts +60 -0
  27. package/dist/src/lib/wellknown.effects.d.ts.map +1 -0
  28. package/dist/src/lib/wellknown.effects.js +88 -0
  29. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  30. package/eslint.config.mjs +1 -1
  31. package/package.json +3 -3
  32. package/src/index.ts +10 -2
  33. package/src/lib/authorize.effects.ts +5 -3
  34. package/src/lib/authorize.test.ts +138 -0
  35. package/src/lib/state-pkce.effects.ts +5 -7
  36. package/src/lib/state-pkce.test.ts +121 -0
  37. package/src/lib/wellknown.effects.test.ts +182 -0
  38. package/src/lib/wellknown.effects.ts +130 -0
  39. package/tsconfig.json +0 -6
  40. package/vite.config.ts +0 -0
  41. package/dist/src/lib/authorize.types.d.ts +0 -25
  42. package/dist/src/lib/authorize.types.d.ts.map +0 -1
  43. package/dist/src/lib/authorize.types.js +0 -7
  44. package/dist/src/lib/index.d.ts +0 -3
  45. package/dist/src/lib/index.d.ts.map +0 -1
  46. package/dist/src/lib/index.js +0 -8
  47. package/src/lib/authorize.types.ts +0 -32
  48. package/src/lib/index.ts +0 -9
@@ -7,9 +7,12 @@
7
7
 
8
8
  import { createVerifier, createState } from '@forgerock/sdk-utilities';
9
9
 
10
- import type { GetAuthorizationUrlOptions } from './authorize.types.js';
10
+ import type {
11
+ GenerateAndStoreAuthUrlValues,
12
+ GetAuthorizationUrlOptions,
13
+ } from '@forgerock/sdk-types';
11
14
 
12
- function getStorageKey(clientId: string, prefix?: string) {
15
+ export function getStorageKey(clientId: string, prefix?: string) {
13
16
  return `${prefix || 'FR-SDK'}-authflow-${clientId}`;
14
17
  }
15
18
 
@@ -19,11 +22,6 @@ function getStorageKey(clientId: string, prefix?: string) {
19
22
  * @param {GenerateAndStoreAuthUrlValues} options - Options for generating PKCE values
20
23
  * @returns { state: string, verifier: string, GetAuthorizationUrlOptions }
21
24
  */
22
- interface GenerateAndStoreAuthUrlValues extends GetAuthorizationUrlOptions {
23
- login?: 'redirect' | 'embedded';
24
- clientId: string;
25
- prefix?: string;
26
- }
27
25
 
28
26
  export function generateAndStoreAuthUrlValues(
29
27
  options: GenerateAndStoreAuthUrlValues,
@@ -0,0 +1,121 @@
1
+ /*
2
+ * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
3
+ *
4
+ * This software may be modified and distributed under the terms
5
+ * of the MIT license. See the LICENSE file for details.
6
+ */
7
+
8
+ import { describe, expect, it, beforeEach } from 'vitest';
9
+ import {
10
+ generateAndStoreAuthUrlValues,
11
+ getStorageKey,
12
+ getStoredAuthUrlValues,
13
+ } from './state-pkce.effects.js';
14
+ import type { GenerateAndStoreAuthUrlValues } from '@forgerock/sdk-types';
15
+
16
+ const mockSessionStorage = (() => {
17
+ let store: { [key: string]: string } = {};
18
+ return {
19
+ getItem: (key: string) => store[key] || null,
20
+ setItem: (key: string, value: string) => {
21
+ store[key] = value;
22
+ },
23
+ removeItem: (key: string) => {
24
+ delete store[key];
25
+ },
26
+ clear: () => {
27
+ store = {};
28
+ },
29
+ length: 0,
30
+ key: (index: number) => Object.keys(store)[index] || null,
31
+ };
32
+ })();
33
+
34
+ describe('PKCE', () => {
35
+ beforeEach(() => {
36
+ if (typeof sessionStorage === 'undefined') {
37
+ global.sessionStorage = mockSessionStorage;
38
+ }
39
+
40
+ sessionStorage.clear();
41
+ });
42
+
43
+ const mockOptions: GenerateAndStoreAuthUrlValues = {
44
+ clientId: 'test-client',
45
+ redirectUri: 'http://localhost:8080',
46
+ scope: 'openid profile',
47
+ responseType: 'code',
48
+ };
49
+
50
+ describe('getStorageKey', () => {
51
+ const clientId = 'test-client-id';
52
+
53
+ it('should generate storage key with default prefix', () => {
54
+ const key = getStorageKey(clientId);
55
+ expect(key).toBe('FR-SDK-authflow-test-client-id');
56
+ });
57
+
58
+ it('should generate storage key with custom prefix', () => {
59
+ const customPrefix = 'CUSTOM';
60
+ const key = getStorageKey(clientId, customPrefix);
61
+ expect(key).toBe('CUSTOM-authflow-test-client-id');
62
+ });
63
+ });
64
+
65
+ describe('generateAndStoreAuthUrlValues', () => {
66
+ it('should generate PKCE values', () => {
67
+ const [options] = generateAndStoreAuthUrlValues(mockOptions);
68
+
69
+ expect(options).toBeDefined();
70
+ expect(options).toHaveProperty('state');
71
+ expect(options).toHaveProperty('verifier');
72
+ });
73
+
74
+ it('should store options in sessionStorage when storage function is called', () => {
75
+ const [options, storeAuthUrl] = generateAndStoreAuthUrlValues(mockOptions);
76
+ storeAuthUrl();
77
+
78
+ const storageKey = getStorageKey(mockOptions.clientId, mockOptions.prefix);
79
+ const storedValue = sessionStorage.getItem(storageKey);
80
+ expect(storedValue).toBeDefined();
81
+
82
+ const parsedValue = JSON.parse(storedValue as string);
83
+ expect(parsedValue).toEqual(options);
84
+ });
85
+ });
86
+
87
+ describe('getStoredAuthUrlValues', () => {
88
+ it('should retrieve and parse stored values', () => {
89
+ const [options, storeAuthUrl] = generateAndStoreAuthUrlValues(mockOptions);
90
+ storeAuthUrl();
91
+
92
+ const storedValues = getStoredAuthUrlValues(mockOptions.clientId, mockOptions.prefix);
93
+ expect(storedValues).toEqual(options);
94
+ });
95
+
96
+ it('should remove values from storage after retrieval', () => {
97
+ const [, storeAuthUrl] = generateAndStoreAuthUrlValues(mockOptions);
98
+ storeAuthUrl();
99
+
100
+ const storageKey = getStorageKey(mockOptions.clientId, mockOptions.prefix);
101
+
102
+ // Verify value exists before retrieval
103
+ expect(sessionStorage.getItem(storageKey)).toBeDefined();
104
+
105
+ // Retrieve values
106
+ getStoredAuthUrlValues(mockOptions.clientId, mockOptions.prefix);
107
+
108
+ // Verify value was removed
109
+ expect(sessionStorage.getItem(storageKey)).toBeNull();
110
+ });
111
+
112
+ it('should throw error when stored values cannot be parsed', () => {
113
+ const storageKey = getStorageKey(mockOptions.clientId, mockOptions.prefix);
114
+ sessionStorage.setItem(storageKey, 'invalid json');
115
+
116
+ expect(() => getStoredAuthUrlValues(mockOptions.clientId, mockOptions.prefix)).toThrow(
117
+ 'Stored values for Auth URL could not be parsed',
118
+ );
119
+ });
120
+ });
121
+ });
@@ -0,0 +1,182 @@
1
+ /*
2
+ * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
3
+ *
4
+ * This software may be modified and distributed under the terms
5
+ * of the MIT license. See the LICENSE file for details.
6
+ */
7
+
8
+ import { describe, it, expect } from 'vitest';
9
+ import { isValidWellknownResponse, initWellknownQuery } from './wellknown.effects.js';
10
+
11
+ import type { WellknownResponse } from '@forgerock/sdk-types';
12
+
13
+ const WELLKNOWN_URL = 'https://example.com/.well-known/openid-configuration';
14
+
15
+ function createMockWellknown(overrides: Partial<WellknownResponse> = {}): WellknownResponse {
16
+ return {
17
+ issuer: 'https://am.example.com/am/oauth2/alpha',
18
+ authorization_endpoint: 'https://am.example.com/am/oauth2/alpha/authorize',
19
+ token_endpoint: 'https://am.example.com/am/oauth2/alpha/access_token',
20
+ userinfo_endpoint: 'https://am.example.com/am/oauth2/alpha/userinfo',
21
+ end_session_endpoint: 'https://am.example.com/am/oauth2/alpha/connect/endSession',
22
+ introspection_endpoint: 'https://am.example.com/am/oauth2/alpha/introspect',
23
+ revocation_endpoint: 'https://am.example.com/am/oauth2/alpha/token/revoke',
24
+ ...overrides,
25
+ };
26
+ }
27
+
28
+ describe('wellknown.effects', () => {
29
+ describe('isValidWellknownResponse', () => {
30
+ describe('isValidWellknownResponse_AllRequiredFields_ReturnsTrue', () => {
31
+ it('should return true when all 3 required fields are present', () => {
32
+ const data = createMockWellknown();
33
+
34
+ const result = isValidWellknownResponse(data);
35
+
36
+ expect(result).toBe(true);
37
+ });
38
+ });
39
+
40
+ describe('isValidWellknownResponse_MissingIssuer_ReturnsFalse', () => {
41
+ it('should return false when issuer is missing', () => {
42
+ const data = {
43
+ authorization_endpoint: 'https://am.example.com/authorize',
44
+ token_endpoint: 'https://am.example.com/token',
45
+ };
46
+
47
+ const result = isValidWellknownResponse(data);
48
+
49
+ expect(result).toBe(false);
50
+ });
51
+ });
52
+
53
+ describe('isValidWellknownResponse_MissingAuthorizationEndpoint_ReturnsFalse', () => {
54
+ it('should return false when authorization_endpoint is missing', () => {
55
+ const data = {
56
+ issuer: 'https://am.example.com',
57
+ token_endpoint: 'https://am.example.com/token',
58
+ };
59
+
60
+ const result = isValidWellknownResponse(data);
61
+
62
+ expect(result).toBe(false);
63
+ });
64
+ });
65
+
66
+ describe('isValidWellknownResponse_MissingTokenEndpoint_ReturnsFalse', () => {
67
+ it('should return false when token_endpoint is missing', () => {
68
+ const data = {
69
+ issuer: 'https://am.example.com',
70
+ authorization_endpoint: 'https://am.example.com/authorize',
71
+ };
72
+
73
+ const result = isValidWellknownResponse(data);
74
+
75
+ expect(result).toBe(false);
76
+ });
77
+ });
78
+
79
+ describe('isValidWellknownResponse_StringInput_ReturnsFalse', () => {
80
+ it('should return false for string input', () => {
81
+ expect(isValidWellknownResponse('not an object')).toBe(false);
82
+ });
83
+ });
84
+
85
+ describe('isValidWellknownResponse_NullInput_ReturnsFalse', () => {
86
+ it('should return false for null input', () => {
87
+ expect(isValidWellknownResponse(null)).toBe(false);
88
+ });
89
+ });
90
+
91
+ describe('isValidWellknownResponse_UndefinedInput_ReturnsFalse', () => {
92
+ it('should return false for undefined input', () => {
93
+ expect(isValidWellknownResponse(undefined)).toBe(false);
94
+ });
95
+ });
96
+ });
97
+
98
+ describe('initWellknownQuery', () => {
99
+ describe('initWellknownQuery_SuccessfulCallback_ReturnsData', () => {
100
+ it('should return { data } when callback returns a valid response', async () => {
101
+ const wellknown = createMockWellknown();
102
+ const callback = async () => ({ data: wellknown });
103
+
104
+ const result = await initWellknownQuery(WELLKNOWN_URL).applyQuery(callback);
105
+
106
+ expect(result).toEqual({ data: wellknown });
107
+ });
108
+ });
109
+
110
+ describe('initWellknownQuery_CallbackReturnsError_PassesThroughError', () => {
111
+ it('should pass through the error when callback returns an error result', async () => {
112
+ const queryError = { status: 404, data: { message: 'Not Found' } };
113
+ const callback = async () => ({ error: queryError });
114
+
115
+ const result = await initWellknownQuery(WELLKNOWN_URL).applyQuery(callback);
116
+
117
+ expect(result).toEqual({ error: queryError });
118
+ });
119
+ });
120
+
121
+ describe('initWellknownQuery_CallbackThrows_ReturnsCUSTOM_ERROR', () => {
122
+ it('should catch thrown errors and return CUSTOM_ERROR', async () => {
123
+ const callback = async () => {
124
+ throw new Error('Network failure');
125
+ };
126
+
127
+ const result = await initWellknownQuery(WELLKNOWN_URL).applyQuery(callback);
128
+
129
+ expect(result.error).toBeDefined();
130
+ expect(result.error?.status).toBe('CUSTOM_ERROR');
131
+ expect(result.error?.error).toBe('Network failure');
132
+ });
133
+ });
134
+
135
+ describe('initWellknownQuery_CallbackThrowsNonError_ReturnsCUSTOM_ERROR', () => {
136
+ it('should handle non-Error throws with a generic message', async () => {
137
+ const callback = async () => {
138
+ throw 'string error';
139
+ };
140
+
141
+ const result = await initWellknownQuery(WELLKNOWN_URL).applyQuery(callback);
142
+
143
+ expect(result.error).toBeDefined();
144
+ expect(result.error?.status).toBe('CUSTOM_ERROR');
145
+ expect(result.error?.error).toBe('An unknown error occurred during well-known fetch');
146
+ });
147
+ });
148
+
149
+ describe('initWellknownQuery_InvalidResponse_ReturnsCUSTOM_ERROR', () => {
150
+ it('should return CUSTOM_ERROR when response is missing required fields', async () => {
151
+ const callback = async () => ({
152
+ data: {
153
+ issuer: 'https://am.example.com',
154
+ authorization_endpoint: 'https://am.example.com/authorize',
155
+ },
156
+ });
157
+
158
+ const result = await initWellknownQuery(WELLKNOWN_URL).applyQuery(callback);
159
+
160
+ expect(result.error).toBeDefined();
161
+ expect(result.error?.status).toBe('CUSTOM_ERROR');
162
+ expect(result.error?.error).toContain('missing required fields');
163
+ });
164
+ });
165
+
166
+ describe('initWellknownQuery_SetsAcceptHeader_InRequest', () => {
167
+ it('should pass Accept: application/json header in the request', async () => {
168
+ let capturedArgs: { url: string; headers: Record<string, string> } | undefined;
169
+ const callback = async (args: { url: string; headers: Record<string, string> }) => {
170
+ capturedArgs = args;
171
+ return { data: createMockWellknown() };
172
+ };
173
+
174
+ await initWellknownQuery(WELLKNOWN_URL).applyQuery(callback);
175
+
176
+ expect(capturedArgs).toBeDefined();
177
+ expect(capturedArgs?.headers).toEqual({ Accept: 'application/json' });
178
+ expect(capturedArgs?.url).toBe(WELLKNOWN_URL);
179
+ });
180
+ });
181
+ });
182
+ });
@@ -0,0 +1,130 @@
1
+ /*
2
+ * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
3
+ *
4
+ * This software may be modified and distributed under the terms
5
+ * of the MIT license. See the LICENSE file for details.
6
+ */
7
+
8
+ import type { WellknownResponse, GenericError } from '@forgerock/sdk-types';
9
+
10
+ /**
11
+ * Structural types compatible with RTK Query's shapes.
12
+ * Defined locally to keep the effects layer framework-agnostic
13
+ * (no dependency on @reduxjs/toolkit).
14
+ */
15
+
16
+ /** Compatible with RTK Query's FetchArgs. */
17
+ interface WellknownFetchArgs {
18
+ url: string;
19
+ headers: Record<string, string>;
20
+ }
21
+
22
+ /** Compatible with RTK Query's FetchBaseQueryError. */
23
+ interface WellknownQueryError {
24
+ status: number | string;
25
+ data?: unknown;
26
+ error?: string;
27
+ }
28
+
29
+ /** Compatible with RTK Query's QueryReturnValue. */
30
+ type WellknownQueryResult<T> =
31
+ | { data: T; error?: undefined; meta?: unknown }
32
+ | { data?: undefined; error: WellknownQueryError; meta?: unknown };
33
+
34
+ function createError(message: string, status: number | string = 'unknown'): GenericError {
35
+ return {
36
+ error: 'Well-known configuration fetch failed',
37
+ message,
38
+ type: 'wellknown_error',
39
+ status,
40
+ };
41
+ }
42
+
43
+ function isObject(value: unknown): value is Record<string, unknown> {
44
+ return typeof value === 'object' && value !== null;
45
+ }
46
+
47
+ /**
48
+ * Validates that the response contains the minimum required OIDC well-known fields.
49
+ *
50
+ * Checks for `issuer`, `authorization_endpoint`, and `token_endpoint` — the
51
+ * minimum subset needed by this SDK. Note that the full OpenID Connect
52
+ * Discovery 1.0 spec defines additional required fields that some providers
53
+ * may not include.
54
+ */
55
+ export function isValidWellknownResponse(data: unknown): data is WellknownResponse {
56
+ if (!isObject(data)) return false;
57
+ return (
58
+ typeof data.issuer === 'string' &&
59
+ typeof data.authorization_endpoint === 'string' &&
60
+ typeof data.token_endpoint === 'string'
61
+ );
62
+ }
63
+
64
+ /** Callback type for the query builder — wraps RTK Query's `baseQuery`. */
65
+ type QueryCallback = (args: WellknownFetchArgs) => Promise<WellknownQueryResult<unknown>>;
66
+
67
+ /**
68
+ * Creates a well-known query builder for use inside RTK Query `queryFn`.
69
+ *
70
+ * Constructs a request object from the URL, then exposes `applyQuery` to
71
+ * execute the request through the caller's `baseQuery`. Response validation
72
+ * uses {@link isValidWellknownResponse}.
73
+ *
74
+ * @param url - The well-known endpoint URL
75
+ * @returns A builder with `applyQuery(callback)` that returns a result compatible with RTK Query's `QueryReturnValue`
76
+ *
77
+ * @example
78
+ * ```typescript
79
+ * queryFn: async (url, _api, _extra, baseQuery) => {
80
+ * return initWellknownQuery(url).applyQuery(async (req) => await baseQuery(req));
81
+ * }
82
+ * ```
83
+ */
84
+ export function initWellknownQuery(url: string) {
85
+ const request: WellknownFetchArgs = {
86
+ url,
87
+ headers: { Accept: 'application/json' },
88
+ };
89
+
90
+ return {
91
+ async applyQuery(callback: QueryCallback): Promise<WellknownQueryResult<WellknownResponse>> {
92
+ let result: WellknownQueryResult<unknown>;
93
+
94
+ try {
95
+ result = await callback(request);
96
+ } catch (error) {
97
+ const message =
98
+ error instanceof Error
99
+ ? error.message
100
+ : 'An unknown error occurred during well-known fetch';
101
+ return {
102
+ error: {
103
+ status: 'CUSTOM_ERROR',
104
+ error: message,
105
+ data: createError(message),
106
+ },
107
+ };
108
+ }
109
+
110
+ if (result.error) {
111
+ return { error: result.error };
112
+ }
113
+
114
+ if (!isValidWellknownResponse(result.data)) {
115
+ return {
116
+ error: {
117
+ status: 'CUSTOM_ERROR',
118
+ error:
119
+ 'Invalid well-known response: missing required fields (issuer, authorization_endpoint, token_endpoint)',
120
+ data: createError(
121
+ 'Invalid well-known response: missing required fields (issuer, authorization_endpoint, token_endpoint)',
122
+ ),
123
+ },
124
+ };
125
+ }
126
+
127
+ return { data: result.data };
128
+ },
129
+ };
130
+ }
package/tsconfig.json CHANGED
@@ -3,12 +3,6 @@
3
3
  "files": [],
4
4
  "include": [],
5
5
  "references": [
6
- {
7
- "path": "../../sdk-utilities"
8
- },
9
- {
10
- "path": "../../sdk-types"
11
- },
12
6
  {
13
7
  "path": "./tsconfig.lib.json"
14
8
  },
package/vite.config.ts CHANGED
Binary file
@@ -1,25 +0,0 @@
1
- import type { LegacyConfigOptions } from '@forgerock/sdk-types';
2
- /**
3
- * Define the options for the authorization URL
4
- * @param clientId The client ID of the application
5
- * @param redirectUri The redirect URI of the application
6
- * @param responseType The response type of the authorization request
7
- * @param scope The scope of the authorization request
8
- */
9
- export type ResponseType = 'code' | 'token';
10
- export interface GetAuthorizationUrlOptions extends LegacyConfigOptions {
11
- /**
12
- * These three properties clientid, scope and redirectUri are required
13
- * when using this type, which are not required when defining Config.
14
- */
15
- clientId: string;
16
- login?: 'redirect' | 'embedded';
17
- scope: string;
18
- redirectUri: string;
19
- responseType: ResponseType;
20
- state?: string;
21
- verifier?: string;
22
- query?: Record<string, string>;
23
- prompt?: 'none' | 'login' | 'consent';
24
- }
25
- //# sourceMappingURL=authorize.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authorize.types.d.ts","sourceRoot":"","sources":["../../../src/lib/authorize.types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5C,MAAM,WAAW,0BAA2B,SAAQ,mBAAmB;IACrE;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACvC"}
@@ -1,7 +0,0 @@
1
- /*
2
- * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
3
- *
4
- * This software may be modified and distributed under the terms
5
- * of the MIT license. See the LICENSE file for details.
6
- */
7
- export {};
@@ -1,3 +0,0 @@
1
- export * from './authorize.effects.js';
2
- export * from './state-pkce.effects.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAOA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
@@ -1,8 +0,0 @@
1
- /*
2
- * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
3
- *
4
- * This software may be modified and distributed under the terms
5
- * of the MIT license. See the LICENSE file for details.
6
- */
7
- export * from './authorize.effects.js';
8
- export * from './state-pkce.effects.js';
@@ -1,32 +0,0 @@
1
- /*
2
- * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
3
- *
4
- * This software may be modified and distributed under the terms
5
- * of the MIT license. See the LICENSE file for details.
6
- */
7
-
8
- import type { LegacyConfigOptions } from '@forgerock/sdk-types';
9
-
10
- /**
11
- * Define the options for the authorization URL
12
- * @param clientId The client ID of the application
13
- * @param redirectUri The redirect URI of the application
14
- * @param responseType The response type of the authorization request
15
- * @param scope The scope of the authorization request
16
- */
17
- export type ResponseType = 'code' | 'token';
18
- export interface GetAuthorizationUrlOptions extends LegacyConfigOptions {
19
- /**
20
- * These three properties clientid, scope and redirectUri are required
21
- * when using this type, which are not required when defining Config.
22
- */
23
- clientId: string;
24
- login?: 'redirect' | 'embedded';
25
- scope: string;
26
- redirectUri: string;
27
- responseType: ResponseType;
28
- state?: string;
29
- verifier?: string;
30
- query?: Record<string, string>;
31
- prompt?: 'none' | 'login' | 'consent';
32
- }
package/src/lib/index.ts DELETED
@@ -1,9 +0,0 @@
1
- /*
2
- * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
3
- *
4
- * This software may be modified and distributed under the terms
5
- * of the MIT license. See the LICENSE file for details.
6
- */
7
-
8
- export * from './authorize.effects.js';
9
- export * from './state-pkce.effects.js';