GenericXmlSecurityToken Class

Represents a security token that is based upon XML.

Namespace: System.IdentityModel.Tokens
Assembly: System.IdentityModel (in system.identitymodel.dll)

public class GenericXmlSecurityToken : SecurityToken
public class GenericXmlSecurityToken extends SecurityToken
public class GenericXmlSecurityToken extends SecurityToken
Not applicable.

Use the GenericXmlSecurityToken class when you receive a token over the wire that is not defined in a specification or there is no way for you to determine the type of the security token. For example, in a Federation scenario when you send a Request Security Token (RST) to a Security Token Service (STS) you do not always know the type of the security token returned by the STS. In such cases, you can use a GenericXmlSecurityToken to store the security token as XML along with its internal and external references.

Use the GenericXmlSecurityToken class to define claims using XML when one of the built-in security tokens does not suffice. Other security tokens can define their claims using XML, however the GenericXmlSecurityToken security token generically allows a security token to have an application-defined set of XML.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0