Class SimpleWebSecurityTokenSerializer
- Namespace
- Microsoft.ServiceBus
- Assembly
- Microsoft.ServiceBus.dll
Represents a class to use to read and to write SimpleWebSecurityToken, JsonSecurityToken, System.IdentityModel.Tokens.SecurityKeyIdentifierClause, and System.IdentityModel.Tokens.SecurityKeyIdentifier objects as XML. This class is intended for internal use only, and kept public only due to compatibility reasons.
public class SimpleWebSecurityTokenSerializer : SecurityTokenSerializer
- Inheritance
-
SimpleWebSecurityTokenSerializer
Constructors
SimpleWebSecurityTokenSerializer()
This class is intended for internal use only, and kept public only due to compatibility reasons.
public SimpleWebSecurityTokenSerializer()
SimpleWebSecurityTokenSerializer(SecurityTokenSerializer)
This class is intended for internal use only, and kept public only due to compatibility reasons.
public SimpleWebSecurityTokenSerializer(SecurityTokenSerializer innerSerializer)
Parameters
innerSerializer
SecurityTokenSerializerA SecurityTokenSerializer to wrap. Typically the default WCF serializer
Fields
DefaultInstance
Specifies an instance of the SimpleWebSecurityTokenSerializer class.
public static readonly SimpleWebSecurityTokenSerializer DefaultInstance
Field Value
Methods
CanReadKeyIdentifierClauseCore(XmlReader)
Determines whether this serializer can read the <KeyIdentifier> element referred by the specified XML reader.
protected override bool CanReadKeyIdentifierClauseCore(XmlReader reader)
Parameters
reader
XmlReaderAn System.Xml.XmlReader to read the key identifier clause.
Returns
- bool
true when the specified <KeyIdentifier> element can be read; otherwise, false.
CanReadKeyIdentifierCore(XmlReader)
Determines whether this serializer can read the <KeyIdentifier> element referred by the specified XML reader.
protected override bool CanReadKeyIdentifierCore(XmlReader reader)
Parameters
reader
XmlReaderAn System.Xml.XmlReader to read the key identifier.
Returns
- bool
true when the specified <KeyIdentifier> element can be read; otherwise, false.
CanReadTokenCore(XmlReader)
Determines whether this serializer can read the security token pointed at by the specified XML reader.
protected override bool CanReadTokenCore(XmlReader reader)
Parameters
reader
XmlReaderAn System.Xml.XmlReader to read the security token.
Returns
- bool
true when the security token can be read; otherwise, false.
CanWriteKeyIdentifierClauseCore(SecurityKeyIdentifierClause)
Determines whether this serializer can write the specified key identifier clause.
protected override bool CanWriteKeyIdentifierClauseCore(SecurityKeyIdentifierClause keyIdentifierClause)
Parameters
keyIdentifierClause
SecurityKeyIdentifierClauseA System.IdentityModel.Tokens.SecurityKeyIdentifierClause that represents the key identifier clause to write.
Returns
- bool
true when this serializer can write the specified key identifier clause; otherwise, false.
CanWriteKeyIdentifierCore(SecurityKeyIdentifier)
Determines whether this serializer can write the specified key identifier.
protected override bool CanWriteKeyIdentifierCore(SecurityKeyIdentifier keyIdentifier)
Parameters
keyIdentifier
SecurityKeyIdentifierA System.IdentityModel.Tokens.SecurityKeyIdentifier that represents the key identifier to write.
Returns
- bool
true when this serializer can write the specified key identifier; otherwise, false.
CanWriteTokenCore(SecurityToken)
Determines whether this serializer can write the specified security token to XML.
protected override bool CanWriteTokenCore(SecurityToken token)
Parameters
token
SecurityTokenThe System.IdentityModel.Tokens.SecurityToken to convert to XML.
Returns
- bool
true when the security token can be written; otherwise, false.
ReadKeyIdentifierClauseCore(XmlReader)
Reads the key identifier clause using the specified XML reader.
protected override SecurityKeyIdentifierClause ReadKeyIdentifierClauseCore(XmlReader reader)
Parameters
reader
XmlReaderAn System.Xml.XmlReader to read the key identifier clause.
Returns
- SecurityKeyIdentifierClause
A System.IdentityModel.Tokens.SecurityKeyIdentifierClause that represents the key identifier that is read.
ReadKeyIdentifierCore(XmlReader)
Reads the key identifier using the specified XML reader.
protected override SecurityKeyIdentifier ReadKeyIdentifierCore(XmlReader reader)
Parameters
reader
XmlReaderAn System.Xml.XmlReader to read the key identifier.
Returns
- SecurityKeyIdentifier
A System.IdentityModel.Tokens.SecurityKeyIdentifier that represents the key identifier that is read.
ReadTokenCore(XmlReader, SecurityTokenResolver)
Reads the security token pointed at by the specified XML reader.
protected override SecurityToken ReadTokenCore(XmlReader reader, SecurityTokenResolver tokenResolver)
Parameters
reader
XmlReaderAn System.Xml.XmlReader to read the SecurityToken or the security token.
tokenResolver
SecurityTokenResolverA System.IdentityModel.Selectors.SecurityTokenResolver that determines the security token type.
Returns
- SecurityToken
A System.IdentityModel.Tokens.SecurityToken that is read from the XML reader.
Exceptions
- NotSupportedException
The encoding of the XML element is not base64Binary.
WriteKeyIdentifierClauseCore(XmlWriter, SecurityKeyIdentifierClause)
Writes the specified key identifier clause using the specified XML writer.
protected override void WriteKeyIdentifierClauseCore(XmlWriter writer, SecurityKeyIdentifierClause keyIdentifierClause)
Parameters
writer
XmlWriterAn System.Xml.XmlWriter used to write the key identifier clause.
keyIdentifierClause
SecurityKeyIdentifierClauseA System.IdentityModel.Tokens.SecurityKeyIdentifierClause that represents the key identifier clause to write.
WriteKeyIdentifierCore(XmlWriter, SecurityKeyIdentifier)
Writes the specified key identifier using the specified XML writer.
protected override void WriteKeyIdentifierCore(XmlWriter writer, SecurityKeyIdentifier keyIdentifier)
Parameters
writer
XmlWriterAn System.Xml.XmlWriter used to write the key identifier.
keyIdentifier
SecurityKeyIdentifierA System.IdentityModel.Tokens.SecurityKeyIdentifier that represents the key identifier to write.
Exceptions
- InvalidOperationException
The binary token content is null.
WriteTokenCore(XmlWriter, SecurityToken)
Writes the specified SecurityToken using the specified XML writer.
protected override void WriteTokenCore(XmlWriter writer, SecurityToken token)
Parameters
writer
XmlWriterAn System.Xml.XmlWriter used to write the SecurityToken or security token.
token
SecurityTokenThe SecurityToken or security token to write.