10 instantiations of UserNameSecurityToken
System.IdentityModel (4)
System\IdentityModel\Selectors\UserNameSecurityTokenProvider.cs (1)
20this.userNameToken = new UserNameSecurityToken(userName, password);
System\IdentityModel\Tokens\UserNameSecurityTokenHandler.cs (2)
162new UserNameSecurityToken(userName, password) : 163new UserNameSecurityToken(userName, password, id);
System\IdentityModel\Tokens\WindowsUserNameSecurityTokenHandler.cs (1)
115windowsIdentity.BootstrapContext = new BootstrapContext(new UserNameSecurityToken(usernameToken.UserName, null), this);
System.ServiceModel (6)
System\ServiceModel\Channels\HttpChannelListener.cs (1)
642SecurityToken securityToken = new UserNameSecurityToken(identity.Name, identity.Password);
System\ServiceModel\Security\SecurityUtils.cs (3)
1414messageProperty.TransportToken = new SecurityTokenSpecification(new UserNameSecurityToken(token.UserName, null, token.Id), messageProperty.TransportToken.SecurityTokenPolicies); 1423messageProperty.ProtectionToken = new SecurityTokenSpecification(new UserNameSecurityToken(token.UserName, null, token.Id), messageProperty.ProtectionToken.SecurityTokenPolicies); 1435messageProperty.IncomingSupportingTokens[i] = new SupportingTokenSpecification(new UserNameSecurityToken(token.UserName, null, token.Id), supportingTokenSpecification.SecurityTokenPolicies, supportingTokenSpecification.SecurityTokenAttachmentMode, supportingTokenSpecification.SecurityTokenParameters);
System\ServiceModel\Security\WSSecurityJan2004.cs (2)
361SecurityToken token = new UserNameSecurityToken(userName, password, id); 398return new UserNameSecurityToken(userName, password, id);
35 references to UserNameSecurityToken
System.IdentityModel (16)
System\IdentityModel\Selectors\UserNameSecurityTokenAuthenticator.cs (3)
19return token is UserNameSecurityToken; 24UserNameSecurityToken userNameToken = (UserNameSecurityToken) token;
System\IdentityModel\Selectors\UserNameSecurityTokenProvider.cs (1)
11UserNameSecurityToken userNameToken;
System\IdentityModel\Tokens\UserNameSecurityTokenHandler.cs (5)
74return typeof(UserNameSecurityToken); 90/// <returns>An instance of <see cref="UserNameSecurityToken"/>.</returns> 186UserNameSecurityToken usernameSecurityToken = token as UserNameSecurityToken; 190throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("token", SR.GetString(SR.ID0018, typeof(UserNameSecurityToken)));
System\IdentityModel\Tokens\WindowsUserNameSecurityTokenHandler.cs (6)
44/// Validates a <see cref="UserNameSecurityToken"/>. 46/// <param name="token">The <see cref="UserNameSecurityToken"/> to validate.</param> 49/// <exception cref="ArgumentException">The token is not assignable from<see cref="UserNameSecurityToken"/>.</exception> 60UserNameSecurityToken usernameToken = token as UserNameSecurityToken; 63throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("token", SR.GetString(SR.ID0018, typeof(UserNameSecurityToken)));
System\IdentityModel\Tokens\WSSecurityJan2004.cs (1)
150protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(UserNameSecurityToken) }; }
System.ServiceModel (19)
System\ServiceModel\Channels\PeerSecurityManager.cs (2)
726UserNameSecurityToken token = tokenProvider.GetToken(ServiceDefaults.SendTimeout) as UserNameSecurityToken;
System\ServiceModel\Channels\TransportSecurityHelpers.cs (4)
489UserNameSecurityToken token = GetToken<UserNameSecurityToken>(tokenProvider.TokenProvider, timeout); 584UserNameSecurityToken token = (UserNameSecurityToken)this.tokenProvider.EndGetToken(result);
System\ServiceModel\Security\SecurityUtils.cs (9)
1411UserNameSecurityToken token = messageProperty.TransportToken.SecurityToken as UserNameSecurityToken; 1412if ((token != null) && !messageProperty.TransportToken.SecurityToken.GetType().IsSubclassOf(typeof(UserNameSecurityToken))) 1420UserNameSecurityToken token = messageProperty.ProtectionToken.SecurityToken as UserNameSecurityToken; 1421if ((token != null) && !messageProperty.ProtectionToken.SecurityToken.GetType().IsSubclassOf(typeof(UserNameSecurityToken))) 1432UserNameSecurityToken token = supportingTokenSpecification.SecurityToken as UserNameSecurityToken; 1433if ((token != null) && !supportingTokenSpecification.SecurityToken.GetType().IsSubclassOf(typeof(UserNameSecurityToken)))
System\ServiceModel\Security\WSSecurityJan2004.cs (4)
349protected override Type[] GetTokenTypesCore() { return new Type[] { typeof(UserNameSecurityToken) }; } 373return CreateDirectReference(issuedTokenXml, UtilityStrings.IdAttribute, UtilityStrings.Namespace, typeof(UserNameSecurityToken)); 403UserNameSecurityToken upToken = (UserNameSecurityToken)token;