| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.Collections.ObjectModel; |
| | | 6 | | using CoreWCF.IdentityModel.Selectors; |
| | | 7 | | |
| | | 8 | | namespace CoreWCF.IdentityModel.Tokens |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// Defines settings for a AudienceRestriction verification. |
| | | 12 | | /// </summary> |
| | | 13 | | public class AudienceRestriction |
| | | 14 | | { |
| | | 15 | | /// <summary> |
| | | 16 | | /// Creates an instance of <see cref="AudienceRestriction"/> |
| | | 17 | | /// </summary> |
| | 10 | 18 | | public AudienceRestriction() |
| | | 19 | | { |
| | 10 | 20 | | } |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// Creates an instance of <see cref="AudienceRestriction"/> |
| | | 24 | | /// </summary> |
| | | 25 | | /// <param name="audienceMode">Specifies the mode in which AudienceUri restriction is applied.</param> |
| | 0 | 26 | | public AudienceRestriction( AudienceUriMode audienceMode ) |
| | | 27 | | { |
| | 0 | 28 | | AudienceMode = audienceMode; |
| | 0 | 29 | | } |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// Gets/Sets the mode in which Audience URI restriction is applied. |
| | | 33 | | /// </summary> |
| | 59 | 34 | | public AudienceUriMode AudienceMode { get; set; } = AudienceUriMode.Always; |
| | | 35 | | |
| | | 36 | | /// <summary> |
| | | 37 | | /// Gets the list of Allowed Audience URIs. |
| | | 38 | | /// </summary> |
| | 99 | 39 | | public Collection<Uri> AllowedAudienceUris { get; } = new Collection<Uri>(); |
| | | 40 | | } |
| | | 41 | | |
| | | 42 | | } |