Table of Contents

Class HttpArtifactType4

Namespace
ComponentSpace.Saml2.Bindings.Artifact
Assembly
ComponentSpace.Saml2.dll

Represents a type 4 artifact used in the HTTP artifact binding.

public class HttpArtifactType4 : HttpArtifact
Inheritance
HttpArtifactType4
Inherited Members

Remarks

Refer to the Bindings for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.

Constructors

HttpArtifactType4()

Initializes a new instance of the HttpArtifactType4 class.

public HttpArtifactType4()

HttpArtifactType4(string)

Initializes a new instance of the HttpArtifactType4 class.

public HttpArtifactType4(string artifact)

Parameters

artifact string

The base 64 encoded artifact.

Exceptions

SamlBindingException

Thrown when the artifact is invalid.

Fields

ArtifactType4Length

The type 4 artifact length.

public const int ArtifactType4Length = 44

Field Value

int

MessageHandleLength

The message handle length.

public const int MessageHandleLength = 20

Field Value

int

SourceIDLength

The source identifier length.

public const int SourceIDLength = 20

Field Value

int

Properties

MessageHandle

Gets or sets the 20 byte message handle.

public byte[] MessageHandle { get; set; }

Property Value

byte[]

The 20 byte message handle.

Exceptions

SamlBindingException

Thrown when the message handle is invalid.

See Also

SourceID

Gets or sets the 20 byte source ID.

public byte[] SourceID { get; set; }

Property Value

byte[]

The 20 byte source ID.

Exceptions

SamlBindingException

Thrown when the source ID is invalid.

See Also

Methods

CreateMessageHandle()

Creates a random message handle.

public static byte[] CreateMessageHandle()

Returns

byte[]

The 20 byte message handle.

CreateSourceId(string)

Creates a source identifier by computing the SHA-1 hash of the identification URL.

public static byte[] CreateSourceId(string identificationUrl)

Parameters

identificationUrl string

The identification URL.

Returns

byte[]

The source identifier.

Remarks

SHA-1 is the hash algorithm specified by the SAML specification.

IsValid(string)

Indicates whether the artifact is valid or not.

public static bool IsValid(string artifact)

Parameters

artifact string

The base 64 encoded artifact.

Returns

bool

true if the artifact is valid; otherwise false.

ToArray()

Returns the artifact as a byte array.

public override byte[] ToArray()

Returns

byte[]

The artifact as a byte array.