NamedKeySecurityToken Constructor
A SecurityToken that contains a IEnumerable<T>(System.IdentityModel.Tokens.SecurityKey) that can be matched by name.
Namespace: System.IdentityModel.Tokens
Assembly: System.IdentityModel.Tokens.Jwt (in System.IdentityModel.Tokens.Jwt.dll)
Syntax
'Declaration
Public Sub New ( _
name As String, _
keys As IEnumerable(Of SecurityKey) _
)
public NamedKeySecurityToken(
string name,
IEnumerable<SecurityKey> keys
)
public:
NamedKeySecurityToken(
String^ name,
IEnumerable<SecurityKey^>^ keys
)
new :
name:string *
keys:IEnumerable<SecurityKey> -> NamedKeySecurityToken
public function NamedKeySecurityToken(
name : String,
keys : IEnumerable<SecurityKey>
)
Parameters
name
Type: System.StringA name for the IEnumerable<T>(System.IdentityModel.Tokens.SecurityKey).
keys
Type: System.Collections.Generic.IEnumerable<SecurityKey>A collection of SecurityKey
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | 'name' is null. -or- 'keys' is null. |
ArgumentException | string.IsNullOrWhiteSpace( 'name' ) is true. |
.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.