| | | 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 | | |
| | | 6 | | namespace CoreWCF.Security.Tokens |
| | | 7 | | { |
| | | 8 | | internal sealed class InitiatorServiceModelSecurityTokenRequirement : ServiceModelSecurityTokenRequirement |
| | | 9 | | { |
| | | 10 | | //WebHeaderCollection webHeaderCollection; |
| | | 11 | | |
| | | 12 | | public InitiatorServiceModelSecurityTokenRequirement() |
| | 0 | 13 | | : base() |
| | | 14 | | { |
| | 0 | 15 | | Properties.Add(IsInitiatorProperty, (object)true); |
| | 0 | 16 | | } |
| | | 17 | | |
| | | 18 | | public EndpointAddress TargetAddress |
| | | 19 | | { |
| | | 20 | | get |
| | | 21 | | { |
| | 0 | 22 | | return GetPropertyOrDefault<EndpointAddress>(TargetAddressProperty, null); |
| | | 23 | | } |
| | | 24 | | set |
| | | 25 | | { |
| | 0 | 26 | | Properties[TargetAddressProperty] = value; |
| | 0 | 27 | | } |
| | | 28 | | } |
| | | 29 | | |
| | | 30 | | public Uri Via |
| | | 31 | | { |
| | | 32 | | get |
| | | 33 | | { |
| | 0 | 34 | | return GetPropertyOrDefault<Uri>(ViaProperty, null); |
| | | 35 | | } |
| | | 36 | | set |
| | | 37 | | { |
| | 0 | 38 | | Properties[ViaProperty] = value; |
| | 0 | 39 | | } |
| | | 40 | | } |
| | | 41 | | |
| | | 42 | | internal bool IsOutOfBandToken |
| | | 43 | | { |
| | | 44 | | get |
| | | 45 | | { |
| | 0 | 46 | | return GetPropertyOrDefault<bool>(IsOutOfBandTokenProperty, false); |
| | | 47 | | } |
| | | 48 | | set |
| | | 49 | | { |
| | 0 | 50 | | Properties[IsOutOfBandTokenProperty] = value; |
| | 0 | 51 | | } |
| | | 52 | | } |
| | | 53 | | |
| | | 54 | | internal bool PreferSslCertificateAuthenticator |
| | | 55 | | { |
| | | 56 | | get |
| | | 57 | | { |
| | 0 | 58 | | return GetPropertyOrDefault<bool>(PreferSslCertificateAuthenticatorProperty, false); |
| | | 59 | | } |
| | | 60 | | set |
| | | 61 | | { |
| | 0 | 62 | | Properties[PreferSslCertificateAuthenticatorProperty] = value; |
| | 0 | 63 | | } |
| | | 64 | | } |
| | | 65 | | |
| | | 66 | | //internal WebHeaderCollection WebHeaders |
| | | 67 | | //{ |
| | | 68 | | // get |
| | | 69 | | // { |
| | | 70 | | // return this.webHeaderCollection; |
| | | 71 | | // } |
| | | 72 | | // set |
| | | 73 | | // { |
| | | 74 | | // this.webHeaderCollection = value; |
| | | 75 | | // } |
| | | 76 | | //} |
| | | 77 | | |
| | | 78 | | public override string ToString() |
| | | 79 | | { |
| | 0 | 80 | | return InternalToString(); |
| | | 81 | | } |
| | | 82 | | } |
| | | 83 | | } |