แก้ไข

แชร์ผ่าน


WindowsUserNameSecurityTokenHandler.ValidateToken(SecurityToken) Method

Definition

Validates the specified token and returns its claims.

public:
 override System::Collections::ObjectModel::ReadOnlyCollection<System::Security::Claims::ClaimsIdentity ^> ^ ValidateToken(System::IdentityModel::Tokens::SecurityToken ^ token);
public override System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Claims.ClaimsIdentity> ValidateToken (System.IdentityModel.Tokens.SecurityToken token);
override this.ValidateToken : System.IdentityModel.Tokens.SecurityToken -> System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Claims.ClaimsIdentity>
Public Overrides Function ValidateToken (token As SecurityToken) As ReadOnlyCollection(Of ClaimsIdentity)

Parameters

token
SecurityToken

The token to validate. An instance of UserNameSecurityToken.

Returns

The identities that are contained in the token.

Exceptions

token is null.

token is not assignable from UserNameSecurityToken.

-or-

The UserName property of the specified token is not of the form user\domain.

LogonUser using the specified token failed.

Applies to