< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Security.Tokens.UserNameSecurityTokenParameters
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/Tokens/UserNameSecurityTokenParameters.cs
Line coverage
86%
Covered lines: 13
Uncovered lines: 2
Coverable lines: 15
Total lines: 43
Line coverage: 86.6%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%11100%
.ctor()100%11100%
CloneCore()100%11100%
CreateKeyIdentifierClause(...)100%110%
InitializeSecurityTokenRequirement(...)100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/Tokens/UserNameSecurityTokenParameters.cs

#LineLine coverage
 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
 4using CoreWCF.IdentityModel;
 5using CoreWCF.IdentityModel.Selectors;
 6using CoreWCF.IdentityModel.Tokens;
 7
 8namespace CoreWCF.Security.Tokens
 9{
 10    public class UserNameSecurityTokenParameters : SecurityTokenParameters
 11    {
 46912        protected UserNameSecurityTokenParameters(UserNameSecurityTokenParameters other) : base(other)
 13        {
 46914            RequireDerivedKeys = false;
 46915        }
 16
 16117        public UserNameSecurityTokenParameters() : base()
 18        {
 16119            RequireDerivedKeys = false;
 16120        }
 21
 1222        protected internal override bool HasAsymmetricKey => false;
 6123        protected internal override bool SupportsClientAuthentication => true;
 024        protected internal override bool SupportsServerAuthentication => false;
 6125        protected internal override bool SupportsClientWindowsIdentity => true;
 26
 27        protected override SecurityTokenParameters CloneCore()
 28        {
 46929            return new UserNameSecurityTokenParameters(this);
 30        }
 31
 32        protected internal override SecurityKeyIdentifierClause CreateKeyIdentifierClause(SecurityToken token, SecurityT
 33        {
 034            return CreateKeyIdentifierClause<SecurityKeyIdentifierClause, LocalIdKeyIdentifierClause>(token, referenceSt
 35        }
 36
 37        protected internal override void InitializeSecurityTokenRequirement(SecurityTokenRequirement requirement)
 38        {
 1939            requirement.TokenType = SecurityTokenTypes.UserName;
 1940            requirement.RequireCryptographicToken = false;
 1941        }
 42    }
 43}