NamedKeyIssuerTokenResolver.ReadSecurityKey Method
When processing xml in LoadCustomConfiguration each XmlElement that has LocalName = "securityKey' is passed here for processing.
Namespace: System.IdentityModel.Tokens
Assembly: System.IdentityModel.Tokens.Jwt (in System.IdentityModel.Tokens.Jwt.dll)
Syntax
'Declaration
Protected Overridable Sub ReadSecurityKey ( _
element As XmlElement _
)
protected virtual void ReadSecurityKey(
XmlElement element
)
protected:
virtual void ReadSecurityKey(
XmlElement^ element
)
abstract ReadSecurityKey :
element:XmlElement -> unit
override ReadSecurityKey :
element:XmlElement -> unit
protected function ReadSecurityKey(
element : XmlElement
)
Parameters
element
Type: System.Xml.XmlElementcontains xml to map to a named SecurityKey.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | 'element' is null. |
ConfigurationErrorsException | attribute 'symmetricKey' is not found. -or- value of 'symmetricKey' is empty or whitespace. -or- attribute 'name' is not found. -or- value of 'name' is empty or whitespace. -or- value of 'encodingType' is not valid. |
Remarks
A single XmlElement is expected with up to three attributes: {'expected values'}.
<securityKey
symmetricKey {required}
name {required}
EncodingType or encodingType {optional}
>
</securityKey>
If "EncodingType' type is specified only:
'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'
'Base64Binary'
'base64Binary'
are allowed and have the same meaning.When a symmetricKey is found, Convert.FromBase64String( value ) is applied to create the key.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.