Claim Constructors

Definition

Initializes a new instance of the Claim class.

Overloads

Claim(BinaryReader)

Initializes an instance of Claim with the specified BinaryReader.

Claim(Claim)

Initializes a new instance of the Claim class.

Claim(BinaryReader, ClaimsIdentity)

Initializes a new instance of the Claim class with the specified reader and subject.

Claim(Claim, ClaimsIdentity)

Initializes a new instance of the Claim class with the specified security claim and subject.

Claim(String, String)

Initializes a new instance of the Claim class with the specified claim type, and value.

Claim(String, String, String)

Initializes a new instance of the Claim class with the specified claim type, value, and value type.

Claim(String, String, String, String)

Initializes a new instance of the Claim class with the specified claim type, value, value type, and issuer.

Claim(String, String, String, String, String)

Initializes a new instance of the Claim class with the specified claim type, value, value type, issuer, and original issuer.

Claim(String, String, String, String, String, ClaimsIdentity)

Initializes a new instance of the Claim class with the specified claim type, value, value type, issuer, original issuer and subject.

Claim(BinaryReader)

Source:
Claim.cs
Source:
Claim.cs
Source:
Claim.cs

Initializes an instance of Claim with the specified BinaryReader.

C#
public Claim(System.IO.BinaryReader reader);

Parameters

reader
BinaryReader

A BinaryReader pointing to a Claim.

Exceptions

reader is null.

Remarks

Normally, the reader is constructed from the bytes returned from WriteTo.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Claim(Claim)

Source:
Claim.cs
Source:
Claim.cs
Source:
Claim.cs

Initializes a new instance of the Claim class.

C#
protected Claim(System.Security.Claims.Claim other);

Parameters

other
Claim

The security claim.

Exceptions

other is null.

Remarks

Subject is set to null.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Claim(BinaryReader, ClaimsIdentity)

Source:
Claim.cs
Source:
Claim.cs
Source:
Claim.cs

Initializes a new instance of the Claim class with the specified reader and subject.

C#
public Claim(System.IO.BinaryReader reader, System.Security.Claims.ClaimsIdentity subject);
C#
public Claim(System.IO.BinaryReader reader, System.Security.Claims.ClaimsIdentity? subject);

Parameters

reader
BinaryReader

The binary reader.

subject
ClaimsIdentity

The subject that this claim describes.

Exceptions

reader is null.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Claim(Claim, ClaimsIdentity)

Source:
Claim.cs
Source:
Claim.cs
Source:
Claim.cs

Initializes a new instance of the Claim class with the specified security claim and subject.

C#
protected Claim(System.Security.Claims.Claim other, System.Security.Claims.ClaimsIdentity subject);
C#
protected Claim(System.Security.Claims.Claim other, System.Security.Claims.ClaimsIdentity? subject);

Parameters

other
Claim

The security claim.

subject
ClaimsIdentity

The subject that this claim describes.

Exceptions

other is null.

Remarks

Subject is set to subject.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Claim(String, String)

Source:
Claim.cs
Source:
Claim.cs
Source:
Claim.cs

Initializes a new instance of the Claim class with the specified claim type, and value.

C#
public Claim(string type, string value);

Parameters

type
String

The claim type.

value
String

The claim value.

Exceptions

type or value is null.

Remarks

The Subject property is set to null. The Issuer and OriginalIssuer properties are set to DefaultIssuer. The ValueType property is set to ClaimValueTypes.String

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Claim(String, String, String)

Source:
Claim.cs
Source:
Claim.cs
Source:
Claim.cs

Initializes a new instance of the Claim class with the specified claim type, value, and value type.

C#
public Claim(string type, string value, string valueType);
C#
public Claim(string type, string value, string? valueType);

Parameters

type
String

The claim type.

value
String

The claim value.

valueType
String

The claim value type. If this parameter is null, then String is used.

Exceptions

type or value is null.

Remarks

The Subject property is set to null. The Issuer and OriginalIssuer properties are set to DefaultIssuer.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Claim(String, String, String, String)

Source:
Claim.cs
Source:
Claim.cs
Source:
Claim.cs

Initializes a new instance of the Claim class with the specified claim type, value, value type, and issuer.

C#
public Claim(string type, string value, string valueType, string issuer);
C#
public Claim(string type, string value, string? valueType, string? issuer);

Parameters

type
String

The claim type.

value
String

The claim value.

valueType
String

The claim value type. If this parameter is null, then String is used.

issuer
String

The claim issuer. If this parameter is empty or null, then DefaultIssuer is used.

Exceptions

type or value is null.

Remarks

The Subject property is set to null. The OriginalIssuer property is set according to the value of the issuer parameter.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Claim(String, String, String, String, String)

Source:
Claim.cs
Source:
Claim.cs
Source:
Claim.cs

Initializes a new instance of the Claim class with the specified claim type, value, value type, issuer, and original issuer.

C#
public Claim(string type, string value, string valueType, string issuer, string originalIssuer);
C#
public Claim(string type, string value, string? valueType, string? issuer, string? originalIssuer);

Parameters

type
String

The claim type.

value
String

The claim value.

valueType
String

The claim value type. If this parameter is null, then String is used.

issuer
String

The claim issuer. If this parameter is empty or null, then DefaultIssuer is used.

originalIssuer
String

The original issuer of the claim. If this parameter is empty or null, then the OriginalIssuer property is set to the value of the Issuer property.

Exceptions

type or value is null.

Remarks

The Subject property is set to null.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Claim(String, String, String, String, String, ClaimsIdentity)

Source:
Claim.cs
Source:
Claim.cs
Source:
Claim.cs

Initializes a new instance of the Claim class with the specified claim type, value, value type, issuer, original issuer and subject.

C#
public Claim(string type, string value, string valueType, string issuer, string originalIssuer, System.Security.Claims.ClaimsIdentity subject);
C#
public Claim(string type, string value, string? valueType, string? issuer, string? originalIssuer, System.Security.Claims.ClaimsIdentity? subject);

Parameters

type
String

The claim type.

value
String

The claim value.

valueType
String

The claim value type. If this parameter is null, then String is used.

issuer
String

The claim issuer. If this parameter is empty or null, then DefaultIssuer is used.

originalIssuer
String

The original issuer of the claim. If this parameter is empty or null, then the OriginalIssuer property is set to the value of the Issuer property.

subject
ClaimsIdentity

The subject that this claim describes.

Exceptions

type or value is null.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0