Class HTTPArtifactType4
Represents a type 4 artifact used in the HTTP artifact binding.
Inherited Members
Namespace: ComponentSpace.SAML2.Bindings
Assembly: ComponentSpace.Saml2.dll
Syntax
public class HTTPArtifactType4 : HTTPArtifact
  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.
Declaration
public HTTPArtifactType4()
  HTTPArtifactType4(byte[], byte[])
Initializes a new instance of the HTTPArtifactType4 class.
Declaration
public HTTPArtifactType4(byte[] sourceID, byte[] messageHandle)
  Parameters
| Type | Name | Description | 
|---|---|---|
| byte[] | sourceID | The 20 byte source ID.  | 
      
| byte[] | messageHandle | The 20 byte message handle.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SAMLBindingException | Thrown when the artifact is invalid.  | 
      
See Also
HTTPArtifactType4(byte[], byte[], byte[])
Initializes a new instance of the HTTPArtifactType4 class.
Declaration
public HTTPArtifactType4(byte[] endpointIndex, byte[] sourceID, byte[] messageHandle)
  Parameters
| Type | Name | Description | 
|---|---|---|
| byte[] | endpointIndex | The 2 byte endpoint index.  | 
      
| byte[] | sourceID | The 20 byte source ID.  | 
      
| byte[] | messageHandle | The 20 byte message handle.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SAMLBindingException | Thrown when the artifact is invalid.  | 
      
See Also
HTTPArtifactType4(string)
Initializes a new instance of the HTTPArtifactType4 class.
Declaration
public HTTPArtifactType4(string artifact)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | artifact | The base 64 encoded artifact.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SAMLBindingException | Thrown when the artifact is invalid.  | 
      
Fields
ArtifactType4Length
The type 4 artifact length.
Declaration
public const int ArtifactType4Length = 44
  Field Value
| Type | Description | 
|---|---|
| int | 
MessageHandleLength
The message handle length.
Declaration
public const int MessageHandleLength = 20
  Field Value
| Type | Description | 
|---|---|
| int | 
SourceIDLength
The source identifier length.
Declaration
public const int SourceIDLength = 20
  Field Value
| Type | Description | 
|---|---|
| int | 
Properties
MessageHandle
Gets or sets the 20 byte message handle.
Declaration
public byte[] MessageHandle { get; set; }
  Property Value
| Type | Description | 
|---|---|
| byte[] | The 20 byte message handle.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SAMLBindingException | Thrown when the message handle is invalid.  | 
      
See Also
SourceID
Gets or sets the 20 byte source ID.
Declaration
public byte[] SourceID { get; set; }
  Property Value
| Type | Description | 
|---|---|
| byte[] | The 20 byte source ID.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SAMLBindingException | Thrown when the source ID is invalid.  | 
      
See Also
Methods
CreateMessageHandle()
Creates a message handle from a random GUID.
Declaration
public static byte[] CreateMessageHandle()
  Returns
| Type | Description | 
|---|---|
| byte[] | The 20 byte message handle.  | 
      
CreateSourceId(string)
Creates a source identifier by computing the SHA-1 hash of the identification URL.
Declaration
public static byte[] CreateSourceId(string identificationURL)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | identificationURL | The identification URL.  | 
      
Returns
| Type | Description | 
|---|---|
| byte[] | The source identifier.  | 
      
IsValid(string)
Indicates whether the artifact is valid or not.
Declaration
public static bool IsValid(string artifact)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | artifact | The base 64 encoded artifact.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
ToString()
Returns the base 64 encoded artifact.
Declaration
public override string ToString()
  Returns
| Type | Description | 
|---|---|
| string | The base 64 encoded artifact  |