JwtPayload Constructor (String, String, IEnumerable<Claim>, Lifetime)
Creates a JwtPayload object with claims added for each of the specified parameters.
Namespace: System.IdentityModel.Tokens
Assembly: System.IdentityModel.Tokens.Jwt (in System.IdentityModel.Tokens.Jwt.dll)
Syntax
'Declaration
Public Sub New ( _
issuer As String, _
audience As String, _
claims As IEnumerable(Of Claim), _
lifetime As Lifetime _
)
public JwtPayload(
string issuer,
string audience,
IEnumerable<Claim> claims,
Lifetime lifetime
)
public:
JwtPayload(
String^ issuer,
String^ audience,
IEnumerable<Claim^>^ claims,
Lifetime^ lifetime
)
new :
issuer:string *
audience:string *
claims:IEnumerable<Claim> *
lifetime:Lifetime -> JwtPayload
public function JwtPayload(
issuer : String,
audience : String,
claims : IEnumerable<Claim>,
lifetime : Lifetime
)
Parameters
issuer
Type: System.StringIf this value is not null, a { iss, 'issuer' } claim will be added.
audience
Type: System.StringIf this value is not null, a { aud, 'audience' } claim will be added.
claims
Type: System.Collections.Generic.IEnumerable<Claim>If this value is not null, a claim in the form of { 'Claim.Type', 'Claim.Value' } for each Claim is added. If duplicate claims are found, a { 'Claim.Type', List<object> } will be created to contain the duplicate values.
lifetime
Type: System.IdentityModel.Protocols.WSTrust.Lifetimeif this value is not null, and if HasValue a { nbf, 'value' } is added.
Remarks
Comparison is set to Ordinal
.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.