@@ -214,27 +214,114 @@ public async Task Strongly_typed_accessors_should_behave_as_expected()
214
214
215
215
disco . IsError . ShouldBeFalse ( ) ;
216
216
217
+ // Endpoints
218
+ disco . Issuer . ShouldBe ( "https://demo.identityserver.io" ) ;
219
+ disco . JwksUri . ShouldBe ( "https://demo.identityserver.io/.well-known/jwks" ) ;
217
220
disco . TokenEndpoint . ShouldBe ( "https://demo.identityserver.io/connect/token" ) ;
218
221
disco . AuthorizeEndpoint . ShouldBe ( "https://demo.identityserver.io/connect/authorize" ) ;
219
222
disco . UserInfoEndpoint . ShouldBe ( "https://demo.identityserver.io/connect/userinfo" ) ;
223
+ disco . IntrospectionEndpoint . ShouldBe ( "https://demo.identityserver.io/connect/introspect" ) ;
224
+ disco . RevocationEndpoint . ShouldBe ( "https://demo.identityserver.io/connect/revocation" ) ;
225
+ disco . DeviceAuthorizationEndpoint . ShouldBe ( "https://demo.identityserver.io/connect/deviceauthorization" ) ;
226
+ disco . BackchannelAuthenticationEndpoint . ShouldBe ( "https://demo.identityserver.io/connect/ciba" ) ;
220
227
disco . PushedAuthorizationRequestEndpoint . ShouldBe ( "https://demo.identityserver.io/connect/par" ) ;
228
+ disco . EndSessionEndpoint . ShouldBe ( "https://demo.identityserver.io/connect/endsession" ) ;
229
+ disco . RegistrationEndpoint . ShouldBe ( "https://demo.identityserver.io/connect/dcr" ) ;
230
+ disco . CheckSessionIframe . ShouldBe ( "https://demo.identityserver.io/connect/checksession" ) ;
221
231
222
232
disco . FrontChannelLogoutSupported . ShouldBe ( true ) ;
223
233
disco . FrontChannelLogoutSessionSupported . ShouldBe ( true ) ;
234
+ disco . RequirePushedAuthorizationRequests . ShouldBe ( true ) ;
224
235
236
+ // Response Modes
225
237
var responseModes = disco . ResponseModesSupported . ToList ( ) ;
226
-
238
+ responseModes . Count . ShouldBe ( 3 ) ;
227
239
responseModes . ShouldContain ( "form_post" ) ;
228
240
responseModes . ShouldContain ( "query" ) ;
229
241
responseModes . ShouldContain ( "fragment" ) ;
230
242
243
+ // Grant Types
244
+ var grantTypes = disco . GrantTypesSupported . ToList ( ) ;
245
+ grantTypes . Count . ShouldBe ( 5 ) ;
246
+ grantTypes . ShouldContain ( "authorization_code" ) ;
247
+ grantTypes . ShouldContain ( "client_credentials" ) ;
248
+ grantTypes . ShouldContain ( "password" ) ;
249
+ grantTypes . ShouldContain ( "refresh_token" ) ;
250
+ grantTypes . ShouldContain ( "implicit" ) ;
251
+
252
+ // Response Types
253
+ var responseTypes = disco . ResponseTypesSupported . ToList ( ) ;
254
+ responseTypes . Count . ShouldBe ( 7 ) ;
255
+ responseTypes . ShouldContain ( "code" ) ;
256
+ responseTypes . ShouldContain ( "token" ) ;
257
+ responseTypes . ShouldContain ( "id_token" ) ;
258
+ responseTypes . ShouldContain ( "id_token token" ) ;
259
+ responseTypes . ShouldContain ( "code id_token" ) ;
260
+ responseTypes . ShouldContain ( "code token" ) ;
261
+ responseTypes . ShouldContain ( "code id_token token" ) ;
262
+
263
+ // Subject Types
264
+ var subjectTypes = disco . SubjectTypesSupported . ToList ( ) ;
265
+ subjectTypes . Count . ShouldBe ( 1 ) ;
266
+ subjectTypes . ShouldContain ( "public" ) ;
267
+
268
+ // PKCE Methods
269
+ var codeChallengeMethodsSupported = disco . CodeChallengeMethodsSupported . ToList ( ) ;
270
+ codeChallengeMethodsSupported . Count . ShouldBe ( 2 ) ;
271
+ codeChallengeMethodsSupported . ShouldContain ( "plain" ) ;
272
+ codeChallengeMethodsSupported . ShouldContain ( "S256" ) ;
273
+
274
+ // Scopes
275
+ var scopes = disco . ScopesSupported . ToList ( ) ;
276
+ scopes . Count . ShouldBe ( 7 ) ;
277
+ scopes . ShouldContain ( "openid" ) ;
278
+ scopes . ShouldContain ( "profile" ) ;
279
+ scopes . ShouldContain ( "email" ) ;
280
+ scopes . ShouldContain ( "address" ) ;
281
+ scopes . ShouldContain ( "phone" ) ;
282
+ scopes . ShouldContain ( "offline_access" ) ;
283
+ scopes . ShouldContain ( "api" ) ;
284
+
285
+ // Claims
286
+ var claims = disco . ClaimsSupported . ToList ( ) ;
287
+ claims . Count . ShouldBe ( 20 ) ;
288
+ claims . ShouldContain ( "sub" ) ;
289
+ claims . ShouldContain ( "name" ) ;
290
+ claims . ShouldContain ( "family_name" ) ;
291
+ claims . ShouldContain ( "given_name" ) ;
292
+ claims . ShouldContain ( "middle_name" ) ;
293
+ claims . ShouldContain ( "nickname" ) ;
294
+ claims . ShouldContain ( "preferred_username" ) ;
295
+ claims . ShouldContain ( "profile" ) ;
296
+ claims . ShouldContain ( "picture" ) ;
297
+ claims . ShouldContain ( "website" ) ;
298
+ claims . ShouldContain ( "gender" ) ;
299
+ claims . ShouldContain ( "birthdate" ) ;
300
+ claims . ShouldContain ( "zoneinfo" ) ;
301
+ claims . ShouldContain ( "locale" ) ;
302
+ claims . ShouldContain ( "updated_at" ) ;
303
+ claims . ShouldContain ( "email" ) ;
304
+ claims . ShouldContain ( "email_verified" ) ;
305
+ claims . ShouldContain ( "address" ) ;
306
+ claims . ShouldContain ( "phone_number" ) ;
307
+ claims . ShouldContain ( "phone_number_verified" ) ;
308
+
309
+ // JWKS data
231
310
disco . KeySet . Keys . Count . ShouldBe ( 1 ) ;
232
311
disco . KeySet . Keys . First ( ) . Kid . ShouldBe ( "a3rMUgMFv9tPclLa6yF3zAkfquE" ) ;
233
312
313
+ // mTLS endpoint aliases
234
314
disco . MtlsEndpointAliases . ShouldNotBeNull ( ) ;
235
315
disco . MtlsEndpointAliases . TokenEndpoint . ShouldBeNull ( ) ;
236
316
237
- disco . RequirePushedAuthorizationRequests ! . Value . ShouldBeTrue ( ) ;
317
+ // These collections aren't in the test discovery.json so they should be empty enumerations
318
+ disco . BackchannelTokenDeliveryModesSupported . ShouldBeEmpty ( ) ;
319
+ disco . IntrospectionSigningAlgorithmsSupported . ShouldBeEmpty ( ) ;
320
+ disco . IntrospectionEncryptionAlgorithmsSupported . ShouldBeEmpty ( ) ;
321
+ disco . IntrospectionEncryptionEncValuesSupported . ShouldBeEmpty ( ) ;
322
+
323
+ // These flags aren't in the test discovery.json, so they should be null
324
+ disco . BackchannelUserCodeParameterSupported . ShouldBeNull ( ) ;
238
325
}
239
326
240
327
[ Fact ]
0 commit comments