Jo Shields 3c1f479b9d Imported Upstream version 4.0.0~alpha1
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
2015-04-07 09:35:12 +01:00

93 lines
2.3 KiB
C#

//-----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.ServiceModel;
using System.Xml;
using System.Collections.Generic;
using System.IdentityModel.Selectors;
using System.Globalization;
using System.Net;
namespace System.ServiceModel.Security.Tokens
{
public sealed class InitiatorServiceModelSecurityTokenRequirement : ServiceModelSecurityTokenRequirement
{
WebHeaderCollection webHeaderCollection;
public InitiatorServiceModelSecurityTokenRequirement()
: base()
{
Properties.Add(IsInitiatorProperty, (object)true);
}
public EndpointAddress TargetAddress
{
get
{
return GetPropertyOrDefault<EndpointAddress>(TargetAddressProperty, null);
}
set
{
this.Properties[TargetAddressProperty] = value;
}
}
public Uri Via
{
get
{
return GetPropertyOrDefault<Uri>(ViaProperty, null);
}
set
{
this.Properties[ViaProperty] = value;
}
}
internal bool IsOutOfBandToken
{
get
{
return GetPropertyOrDefault<bool>(IsOutOfBandTokenProperty, false);
}
set
{
this.Properties[IsOutOfBandTokenProperty] = value;
}
}
internal bool PreferSslCertificateAuthenticator
{
get
{
return GetPropertyOrDefault<bool>(PreferSslCertificateAuthenticatorProperty, false);
}
set
{
this.Properties[PreferSslCertificateAuthenticatorProperty] = value;
}
}
internal WebHeaderCollection WebHeaders
{
get
{
return this.webHeaderCollection;
}
set
{
this.webHeaderCollection = value;
}
}
public override string ToString()
{
return InternalToString();
}
}
}