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
artifactstringThe 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
MessageHandleLength
The message handle length.
public const int MessageHandleLength = 20
Field Value
SourceIDLength
The source identifier length.
public const int SourceIDLength = 20
Field Value
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
identificationUrlstringThe 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
artifactstringThe base 64 encoded artifact.
Returns
- bool
trueif the artifact is valid; otherwisefalse.
ToArray()
Returns the artifact as a byte array.
public override byte[] ToArray()
Returns
- byte[]
The artifact as a byte array.