JwtPayload.AddClaims(IEnumerable<Claim>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a number of Claim to the JwtPayload as JSON { name, value } pairs.
public void AddClaims (System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims);
member this.AddClaims : seq<System.Security.Claims.Claim> -> unit
Public Sub AddClaims (claims As IEnumerable(Of Claim))
Parameters
- claims
- IEnumerable<Claim>
For each Claim a JSON pair { 'Claim.Type', 'Claim.Value' } is added. If duplicate claims are found then a { 'Claim.Type', List<object> } will be created to contain the duplicate values.
Exceptions
claims
is null.
Remarks
Any Claim in the IEnumerable<T> that is null, will be ignored.
Applies to
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin