|
6 | 6 | */ |
7 | 7 | import { describe, expectTypeOf, it } from 'vitest'; |
8 | 8 | import type { DaVinciConfig, InternalDaVinciConfig } from './config.types.js'; |
9 | | -import type { AsyncLegacyConfigOptions } from '@forgerock/sdk-types'; |
| 9 | +import type { AsyncLegacyConfigOptions, AuthorizeUrl } from '@forgerock/sdk-types'; |
10 | 10 | import type { WellknownResponse } from './wellknown.types.js'; |
11 | 11 |
|
12 | 12 | describe('Config Types', () => { |
@@ -48,7 +48,7 @@ describe('Config Types', () => { |
48 | 48 | const config: InternalDaVinciConfig = { |
49 | 49 | wellknownResponse: { |
50 | 50 | issuer: 'https://example.com', |
51 | | - authorization_endpoint: 'https://example.com/auth', |
| 51 | + authorization_endpoint: 'https://example.com/auth' as AuthorizeUrl, |
52 | 52 | token_endpoint: 'https://example.com/token', |
53 | 53 | userinfo_endpoint: 'https://example.com/userinfo', |
54 | 54 | jwks_uri: 'https://example.com/jwks', |
@@ -97,7 +97,7 @@ describe('Config Types', () => { |
97 | 97 | // InternalDaVinciConfig specific property |
98 | 98 | wellknownResponse: { |
99 | 99 | issuer: 'https://example.com', |
100 | | - authorization_endpoint: 'https://example.com/auth', |
| 100 | + authorization_endpoint: 'https://example.com/auth' as AuthorizeUrl, |
101 | 101 | token_endpoint: 'https://example.com/token', |
102 | 102 | userinfo_endpoint: 'https://example.com/userinfo', |
103 | 103 | jwks_uri: 'https://example.com/jwks', |
@@ -135,7 +135,7 @@ describe('WellknownResponse', () => { |
135 | 135 | it('should have all required OIDC properties', () => { |
136 | 136 | const wellknown: WellknownResponse = { |
137 | 137 | issuer: 'https://example.com', |
138 | | - authorization_endpoint: 'https://example.com/auth', |
| 138 | + authorization_endpoint: 'https://example.com/auth' as AuthorizeUrl, |
139 | 139 | token_endpoint: 'https://example.com/token', |
140 | 140 | userinfo_endpoint: 'https://example.com/userinfo', |
141 | 141 | jwks_uri: 'https://example.com/jwks', |
@@ -178,7 +178,7 @@ describe('WellknownResponse', () => { |
178 | 178 | it('should allow optional OIDC properties', () => { |
179 | 179 | const wellknownWithOptionals: WellknownResponse = { |
180 | 180 | issuer: 'https://example.com', |
181 | | - authorization_endpoint: 'https://example.com/auth', |
| 181 | + authorization_endpoint: 'https://example.com/auth' as AuthorizeUrl, |
182 | 182 | token_endpoint: 'https://example.com/token', |
183 | 183 | userinfo_endpoint: 'https://example.com/userinfo', |
184 | 184 | jwks_uri: 'https://example.com/jwks', |
@@ -233,7 +233,7 @@ describe('WellknownResponse', () => { |
233 | 233 | it('should enforce URL format for endpoint properties', () => { |
234 | 234 | const wellknown: WellknownResponse = { |
235 | 235 | issuer: 'https://example.com', |
236 | | - authorization_endpoint: 'https://example.com/auth', |
| 236 | + authorization_endpoint: 'https://example.com/auth' as AuthorizeUrl, |
237 | 237 | token_endpoint: 'https://example.com/token', |
238 | 238 | userinfo_endpoint: 'https://example.com/userinfo', |
239 | 239 | jwks_uri: 'https://example.com/jwks', |
|
0 commit comments