@@ -310,125 +310,6 @@ public void Inbound(IInboundContext context) {
310
310
""" ,
311
311
DisplayName = "Should compile validate-azure-ad-token policy with output-token-variable-name"
312
312
) ]
313
- [ DataRow (
314
- """
315
- [Document]
316
- public class PolicyDocument : IDocument
317
- {
318
- public void Inbound(IInboundContext context) {
319
- context.ValidateAzureAdToken(new ValidateAzureAdTokenConfig
320
- {
321
- TenantId = "{{aad-tenant-id}}",
322
- AllowProtectedForwardedTokens = true
323
- });
324
- }
325
- }
326
- """ ,
327
- """
328
- <policies>
329
- <inbound>
330
- <validate-azure-ad-token tenant-id="{{aad-tenant-id}}" allow-protected-forwarded-tokens="true" />
331
- </inbound>
332
- </policies>
333
- """ ,
334
- DisplayName = "Should compile validate-azure-ad-token policy with allow-protected-forwarded-tokens"
335
- ) ]
336
- [ DataRow (
337
- """
338
- [Document]
339
- public class PolicyDocument : IDocument
340
- {
341
- public void Inbound(IInboundContext context) {
342
- context.ValidateAzureAdToken(new ValidateAzureAdTokenConfig
343
- {
344
- TenantId = "{{aad-tenant-id}}",
345
- AllowProtectedForwardedTokens = GetAllowProtectedForwardedTokens(context.ExpressionContext)
346
- });
347
- }
348
- bool GetAllowProtectedForwardedTokens(IExpressionContext context) => (bool)context.Variable["allow-protected-forwarded-tokens"];
349
- }
350
- """ ,
351
- """
352
- <policies>
353
- <inbound>
354
- <validate-azure-ad-token tenant-id="{{aad-tenant-id}}" allow-protected-forwarded-tokens="@((bool)context.Variable["allow-protected-forwarded-tokens"])" />
355
- </inbound>
356
- </policies>
357
- """ ,
358
- DisplayName =
359
- "Should compile validate-azure-ad-token policy with expression in allow-protected-forwarded-tokens"
360
- ) ]
361
- [ DataRow (
362
- """
363
- [Document]
364
- public class PolicyDocument : IDocument
365
- {
366
- public void Inbound(IInboundContext context) {
367
- context.ValidateAzureAdToken(new ValidateAzureAdTokenConfig
368
- {
369
- TenantId = "{{aad-tenant-id}}",
370
- AllowProofOfPossessionTokes = true
371
- });
372
- }
373
- }
374
- """ ,
375
- """
376
- <policies>
377
- <inbound>
378
- <validate-azure-ad-token tenant-id="{{aad-tenant-id}}" allow-proof-of-possession-tokens="true" />
379
- </inbound>
380
- </policies>
381
- """ ,
382
- DisplayName = "Should compile validate-azure-ad-token policy with allow-proof-of-possession-tokens"
383
- ) ]
384
- [ DataRow (
385
- """
386
- [Document]
387
- public class PolicyDocument : IDocument
388
- {
389
- public void Inbound(IInboundContext context) {
390
- context.ValidateAzureAdToken(new ValidateAzureAdTokenConfig
391
- {
392
- TenantId = "{{aad-tenant-id}}",
393
- AllowProofOfPossessionTokes = GetAllowProofOfPossessionTokes(context.ExpressionContext)
394
- });
395
- }
396
- bool GetAllowProofOfPossessionTokes(IExpressionContext context) => (bool)context.Variable["allow-proof-of-possession-tokens"];
397
- }
398
- """ ,
399
- """
400
- <policies>
401
- <inbound>
402
- <validate-azure-ad-token tenant-id="{{aad-tenant-id}}" allow-proof-of-possession-tokens="@((bool)context.Variable["allow-proof-of-possession-tokens"])" />
403
- </inbound>
404
- </policies>
405
- """ ,
406
- DisplayName =
407
- "Should compile validate-azure-ad-token policy with expression in allow-proof-of-possession-tokens"
408
- ) ]
409
- [ DataRow (
410
- """
411
- [Document]
412
- public class PolicyDocument : IDocument
413
- {
414
- public void Inbound(IInboundContext context) {
415
- context.ValidateAzureAdToken(new ValidateAzureAdTokenConfig
416
- {
417
- TenantId = "{{aad-tenant-id}}",
418
- OutputPftTokenVariableName = "variable-name"
419
- });
420
- }
421
- }
422
- """ ,
423
- """
424
- <policies>
425
- <inbound>
426
- <validate-azure-ad-token tenant-id="{{aad-tenant-id}}" output-pft-token-variable-name="variable-name" />
427
- </inbound>
428
- </policies>
429
- """ ,
430
- DisplayName = "Should compile validate-azure-ad-token policy with output-pft-token-variable-name"
431
- ) ]
432
313
[ DataRow (
433
314
"""
434
315
[Document]
0 commit comments