MembershipUserNameSecurityTokenHandler.ValidateToken(SecurityToken) Method

Definition

Validates the specified security token by using the configured MembershipProvider.

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 security token to be validated.

Returns

The identities that are contained in the token.

Exceptions

token is null.

token is not an instance of UserNameSecurityToken.

token failed validation with the configured MembershipProvider.

Remarks

The configured membership provider is referenced through the MembershipProvider property.

Applies to