File: FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityTokenSpecification.cs
Web Access
Project: src\src\dotnet-svcutil\lib\src\dotnet-svcutil-lib.csproj (dotnet-svcutil-lib)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
 
using System.Collections.ObjectModel;
using System.IdentityModel.Policy;
using System.IdentityModel.Tokens;
 
namespace System.ServiceModel.Security
{
    public class SecurityTokenSpecification
    {
        private SecurityToken _token;
        private ReadOnlyCollection<IAuthorizationPolicy> _tokenPolicies;
 
        public SecurityTokenSpecification(SecurityToken token, ReadOnlyCollection<IAuthorizationPolicy> tokenPolicies)
        {
            _token = token;
            if (tokenPolicies == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("tokenPolicies");
            }
            _tokenPolicies = tokenPolicies;
        }
 
        public SecurityToken SecurityToken
        {
            get { return _token; }
        }
 
        public ReadOnlyCollection<IAuthorizationPolicy> SecurityTokenPolicies
        {
            get { return _tokenPolicies; }
        }
    }
}