Share via


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.String

    If this value is not null, a { iss, 'issuer' } claim will be added.

  • audience
    Type: System.String

    If 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.

Remarks

Comparison is set to Ordinal

.NET Framework Security

See Also

Reference

JwtPayload Class

JwtPayload Overload

System.IdentityModel.Tokens Namespace