SupportingTokenAuthenticatorSpecification.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / SupportingTokenAuthenticatorSpecification.cs / 1 / SupportingTokenAuthenticatorSpecification.cs

                            //------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------

namespace System.ServiceModel.Security 
{
    using System.IdentityModel.Selectors; 
    using System.ServiceModel; 
    using System.ServiceModel.Security.Tokens;
 
    class SupportingTokenAuthenticatorSpecification
    {
        SecurityTokenAttachmentMode tokenAttachmentMode;
        SecurityTokenAuthenticator tokenAuthenticator; 
        SecurityTokenResolver tokenResolver;
        SecurityTokenParameters tokenParameters; 
        bool isTokenOptional; 

        public SupportingTokenAuthenticatorSpecification(SecurityTokenAuthenticator tokenAuthenticator, SecurityTokenResolver securityTokenResolver, SecurityTokenAttachmentMode attachmentMode, SecurityTokenParameters tokenParameters) 
            : this(tokenAuthenticator, securityTokenResolver, attachmentMode, tokenParameters, false)
        {
        }
 
        internal SupportingTokenAuthenticatorSpecification(SecurityTokenAuthenticator tokenAuthenticator, SecurityTokenResolver securityTokenResolver, SecurityTokenAttachmentMode attachmentMode, SecurityTokenParameters tokenParameters, bool isTokenOptional)
        { 
            if (tokenAuthenticator == null) 
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("tokenAuthenticator"); 
            }

            SecurityTokenAttachmentModeHelper.Validate(attachmentMode);
 
            if (tokenParameters == null)
            { 
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("tokenParameters"); 
            }
            this.tokenAuthenticator = tokenAuthenticator; 
            this.tokenResolver = securityTokenResolver;
            this.tokenAttachmentMode = attachmentMode;
            this.tokenParameters = tokenParameters;
            this.isTokenOptional = isTokenOptional; 
        }
 
        public SecurityTokenAuthenticator TokenAuthenticator 
        {
            get { return this.tokenAuthenticator; } 
        }

        public SecurityTokenResolver TokenResolver
        { 
            get { return this.tokenResolver; }
        } 
 
        public SecurityTokenAttachmentMode SecurityTokenAttachmentMode
        { 
            get { return this.tokenAttachmentMode; }
        }

        public SecurityTokenParameters TokenParameters 
        {
            get { return this.tokenParameters; } 
        } 

        internal bool IsTokenOptional 
        {
            get { return this.isTokenOptional; }
            set { this.isTokenOptional = value; }
        } 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK