C# Class System.Security.Claims.Claim

Show file Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
Claim ( System reader )
Claim ( System reader, System subject )
Claim ( string type, string value )
Claim ( string type, string value, string valueType )
Claim ( string type, string value, string valueType, string issuer )
Claim ( string type, string value, string valueType, string issuer, string originalIssuer )
Claim ( string type, string value, string valueType, string issuer, string originalIssuer, System subject )
Claim ( BinaryReader reader ) : System.Collections.Generic

Initializes an instance of Claim using a BinaryReader. Normally the BinaryReader is constructed using the bytes from WriteTo(BinaryWriter) and initialized in the same way as the BinaryWriter.

Claim ( BinaryReader reader, ClaimsIdentity subject ) : System.Collections.Generic

Initializes an instance of Claim using a BinaryReader. Normally the BinaryReader is constructed using the bytes from WriteTo(BinaryWriter) and initialized in the same way as the BinaryWriter.

Claim ( string type, string value ) : System.Collections.Generic

Creates a Claim with the specified type and value.

Claim.Issuer is set to ClaimsIdentity.DefaultIssuer, Claim.ValueType is set to ClaimValueTypes.String, Claim.OriginalIssuer is set to ClaimsIdentity.DefaultIssuer, and Claim.Subject is set to null.

Claim ( string type, string value, string valueType ) : System.Collections.Generic

Creates a Claim with the specified type, value, and value type.

Claim.Issuer is set to ClaimsIdentity.DefaultIssuer, Claim.OriginalIssuer is set to ClaimsIdentity.DefaultIssuer, and Claim.Subject is set to null.

Claim ( string type, string value, string valueType, string issuer ) : System.Collections.Generic

Creates a Claim with the specified type, value, value type, and issuer.

Claim.OriginalIssuer is set to value of the issuer parameter, Claim.Subject is set to null.

Claim ( string type, string value, string valueType, string issuer, string originalIssuer ) : System.Collections.Generic

Creates a Claim with the specified type, value, value type, issuer and original issuer.

Claim.Subject is set to null.

Claim ( string type, string value, string valueType, string issuer, string originalIssuer, ClaimsIdentity subject ) : System.Collections.Generic

Creates a Claim with the specified type, value, value type, issuer, original issuer and subject.

Clone ( ) : Claim

Creates a new instance Claim with values copied from this object.

Clone ( ClaimsIdentity identity ) : Claim

Creates a new instance Claim with values copied from this object.

Claim.Subject will be set to 'identity'.

Clone ( ) : System.Security.Claims.Claim
Clone ( System identity ) : System.Security.Claims.Claim
ToString ( ) : string

Returns a string representation of the Claim object.

The returned string contains the values of the Type and Value properties.

WriteTo ( BinaryWriter writer ) : void

Serializes using a BinaryWriter

WriteTo ( System writer ) : void

Protected Methods

Method Description
Claim ( Claim other ) : System.Collections.Generic

Copy constructor for Claim

Claim.Subjectwill be set to 'null'.

Claim ( Claim other, ClaimsIdentity subject ) : System.Collections.Generic

Copy constructor for Claim

Claim.Subjectwill be set to 'subject'.

WriteTo ( BinaryWriter writer, byte userData ) : void

Serializes using a BinaryWriter

WriteTo ( System writer, byte userData ) : void

Private Methods

Method Description
Claim ( string type, string value, string valueType, string issuer, string originalIssuer, ClaimsIdentity subject, string propertyKey, string propertyValue ) : System.Collections.Generic

This internal constructor was added as a performance boost when adding claims that are found in the NTToken. We need to add a property value to distinguish DeviceClaims from UserClaims.

Initialize ( BinaryReader reader, ClaimsIdentity subject ) : void

Method Details

Claim() public method

public Claim ( System reader )
reader System

Claim() public method

public Claim ( System reader, System subject )
reader System
subject System

Claim() public method

public Claim ( string type, string value )
type string
value string

Claim() public method

public Claim ( string type, string value, string valueType )
type string
value string
valueType string

Claim() public method

public Claim ( string type, string value, string valueType, string issuer )
type string
value string
valueType string
issuer string

Claim() public method

public Claim ( string type, string value, string valueType, string issuer, string originalIssuer )
type string
value string
valueType string
issuer string
originalIssuer string

Claim() public method

public Claim ( string type, string value, string valueType, string issuer, string originalIssuer, System subject )
type string
value string
valueType string
issuer string
originalIssuer string
subject System

Claim() public method

Initializes an instance of Claim using a BinaryReader. Normally the BinaryReader is constructed using the bytes from WriteTo(BinaryWriter) and initialized in the same way as the BinaryWriter.
if 'reader' is null.
public Claim ( BinaryReader reader ) : System.Collections.Generic
reader System.IO.BinaryReader a pointing to a .
return System.Collections.Generic

Claim() public method

Initializes an instance of Claim using a BinaryReader. Normally the BinaryReader is constructed using the bytes from WriteTo(BinaryWriter) and initialized in the same way as the BinaryWriter.
if 'reader' is null.
public Claim ( BinaryReader reader, ClaimsIdentity subject ) : System.Collections.Generic
reader System.IO.BinaryReader a pointing to a .
subject ClaimsIdentity the value for , which is the that has these claims.
return System.Collections.Generic

Claim() protected method

Copy constructor for Claim
Claim.Subjectwill be set to 'null'.
if 'other' is null.
protected Claim ( Claim other ) : System.Collections.Generic
other Claim the to copy.
return System.Collections.Generic

Claim() protected method

Copy constructor for Claim
Claim.Subjectwill be set to 'subject'.
if 'other' is null.
protected Claim ( Claim other, ClaimsIdentity subject ) : System.Collections.Generic
other Claim the to copy.
subject ClaimsIdentity the to assign to .
return System.Collections.Generic

Claim() public method

Creates a Claim with the specified type and value.
Claim.Issuer is set to ClaimsIdentity.DefaultIssuer, Claim.ValueType is set to ClaimValueTypes.String, Claim.OriginalIssuer is set to ClaimsIdentity.DefaultIssuer, and Claim.Subject is set to null.
or is null.
public Claim ( string type, string value ) : System.Collections.Generic
type string The claim type.
value string The claim value.
return System.Collections.Generic

Claim() public method

Creates a Claim with the specified type, value, and value type.
Claim.Issuer is set to ClaimsIdentity.DefaultIssuer, Claim.OriginalIssuer is set to ClaimsIdentity.DefaultIssuer, and Claim.Subject is set to null.
or is null.
public Claim ( string type, string value, string valueType ) : System.Collections.Generic
type string The claim type.
value string The claim value.
valueType string The claim value type.
return System.Collections.Generic

Claim() public method

Creates a Claim with the specified type, value, value type, and issuer.
Claim.OriginalIssuer is set to value of the issuer parameter, Claim.Subject is set to null.
or is null.
public Claim ( string type, string value, string valueType, string issuer ) : System.Collections.Generic
type string The claim type.
value string The claim value.
valueType string The claim value type. If this parameter is empty or null, then is used.
issuer string The claim issuer. If this parameter is empty or null, then is used.
return System.Collections.Generic

Claim() public method

Creates a Claim with the specified type, value, value type, issuer and original issuer.
Claim.Subject is set to null.
or is null.
public Claim ( string type, string value, string valueType, string issuer, string originalIssuer ) : System.Collections.Generic
type string The claim type.
value string The claim value.
valueType string The claim value type. If this parameter is null, then is used.
issuer string The claim issuer. If this parameter is empty or null, then is used.
originalIssuer string The original issuer of this claim. If this parameter is empty or null, then orignalIssuer == issuer.
return System.Collections.Generic

Claim() public method

Creates a Claim with the specified type, value, value type, issuer, original issuer and subject.
or is null.
public Claim ( string type, string value, string valueType, string issuer, string originalIssuer, ClaimsIdentity subject ) : System.Collections.Generic
type string The claim type.
value string The claim value.
valueType string The claim value type. If this parameter is null, then is used.
issuer string The claim issuer. If this parameter is empty or null, then is used.
originalIssuer string The original issuer of this claim. If this parameter is empty or null, then orignalIssuer == issuer.
subject ClaimsIdentity The subject that this claim describes.
return System.Collections.Generic

Clone() public method

Creates a new instance Claim with values copied from this object.
public Clone ( ) : Claim
return Claim

Clone() public method

Creates a new instance Claim with values copied from this object.
Claim.Subject will be set to 'identity'.
public Clone ( ClaimsIdentity identity ) : Claim
identity ClaimsIdentity
return Claim

Clone() public method

public Clone ( ) : System.Security.Claims.Claim
return System.Security.Claims.Claim

Clone() public method

public Clone ( System identity ) : System.Security.Claims.Claim
identity System
return System.Security.Claims.Claim

ToString() public method

Returns a string representation of the Claim object.
The returned string contains the values of the Type and Value properties.
public ToString ( ) : string
return string

WriteTo() public method

Serializes using a BinaryWriter
if 'writer' is null.
public WriteTo ( BinaryWriter writer ) : void
writer System.IO.BinaryWriter the to use for data storage.
return void

WriteTo() protected method

Serializes using a BinaryWriter
if 'writer' is null.
protected WriteTo ( BinaryWriter writer, byte userData ) : void
writer System.IO.BinaryWriter the to use for data storage.
userData byte additional data provided by derived type.
return void

WriteTo() public method

public WriteTo ( System writer ) : void
writer System
return void

WriteTo() protected method

protected WriteTo ( System writer, byte userData ) : void
writer System
userData byte
return void