| | | 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 | | namespace CoreWCF.Security.Tokens |
| | | 5 | | { |
| | | 6 | | using CoreWCF.IdentityModel; |
| | | 7 | | using CoreWCF.IdentityModel.Selectors; |
| | | 8 | | using CoreWCF.IdentityModel.Tokens; |
| | | 9 | | using CoreWCF.Security; |
| | | 10 | | |
| | | 11 | | internal class SecurityContextSecurityTokenParameters : SecurityTokenParameters |
| | | 12 | | { |
| | | 13 | | protected SecurityContextSecurityTokenParameters(SecurityContextSecurityTokenParameters other) |
| | 0 | 14 | | : base(other) |
| | | 15 | | { |
| | | 16 | | // empty |
| | 0 | 17 | | } |
| | | 18 | | |
| | | 19 | | public SecurityContextSecurityTokenParameters() |
| | 22 | 20 | | : base() |
| | | 21 | | { |
| | 22 | 22 | | InclusionMode = SecurityTokenInclusionMode.AlwaysToRecipient; |
| | 22 | 23 | | } |
| | | 24 | | |
| | 0 | 25 | | protected internal override bool SupportsClientAuthentication { get { return true; } } |
| | 0 | 26 | | protected internal override bool SupportsServerAuthentication { get { return true; } } |
| | 0 | 27 | | protected internal override bool SupportsClientWindowsIdentity { get { return true; } } |
| | | 28 | | |
| | 0 | 29 | | protected internal override bool HasAsymmetricKey { get { return false; } } |
| | | 30 | | |
| | | 31 | | protected override SecurityTokenParameters CloneCore() |
| | | 32 | | { |
| | 0 | 33 | | return new SecurityContextSecurityTokenParameters(this); |
| | | 34 | | } |
| | | 35 | | |
| | | 36 | | protected internal override SecurityKeyIdentifierClause CreateKeyIdentifierClause(SecurityToken token, SecurityT |
| | | 37 | | { |
| | 0 | 38 | | return CreateKeyIdentifierClause<SecurityContextKeyIdentifierClause, LocalIdKeyIdentifierClause>(token, refe |
| | | 39 | | } |
| | | 40 | | |
| | | 41 | | protected internal override void InitializeSecurityTokenRequirement(SecurityTokenRequirement requirement) |
| | | 42 | | { |
| | 22 | 43 | | requirement.TokenType = ServiceModelSecurityTokenTypes.SecurityContext; |
| | 22 | 44 | | requirement.KeyType = SecurityKeyType.SymmetricKey; |
| | 22 | 45 | | requirement.RequireCryptographicToken = true; |
| | 22 | 46 | | } |
| | | 47 | | } |
| | | 48 | | } |