Skip navigation links

Oracle Fusion Middleware SAML 1.0/1.1 Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10675-03


oracle.security.xmlsec.saml
Class Artifact

java.lang.Object
  extended by oracle.security.xmlsec.saml.Artifact


public class Artifact
extends java.lang.Object

A SAML artifact.

The artifact consists of the base64 encoding of the following byte format:

Since:
2.0

Constructor Summary
Artifact()
          Creates a new Artifact instance with TypeCode = 0x0001 and null values for SourceID and AssertionHandle.
Artifact(byte[] artifactBytes)
          Creates a new Artifact instance by parsing the TypeCode, SourceID and AssertionHandle from the given byte array.
Artifact(byte[] sourceID, byte[] assertionHandle)
          Creates a new Artifact instance with TypeCode = 0x0001 and the given SourceID and AssertionHandle.
Artifact(short typeCode, byte[] sourceID, byte[] assertionHandle)
          Creates a new Artifact instance with the given TypeCode, SourceID and AssertionHandle.
Artifact(java.lang.String artifactString)
          Creates a new Artifact instance by parsing the TypeCode, SourceID and AssertionHandle from the given base64-encoded artifact string.

 

Method Summary
 byte[] getAssertionHandle()
          Returns the assertion handle of this SAML artifact.
 byte[] getBytes()
          Returns the bytes of this SAML artifact.
 byte[] getSourceID()
          Returns the source ID of this SAML artifact.
 short getTypeCode()
          Returns the type code of this SAML artifact.
 void setAssertionHandle(byte[] assertionHandle)
          Sets the assertion handle of this SAML artifact.
 void setSourceID(byte[] sourceID)
          Sets the source ID of this SAML artifact.
 void setTypeCode(short typeCode)
          Sets the type code of this SAML artifact.
 void setValue(byte[] artifactBytes)
          Sets the value of this SAML artifact, and parses the TypeCode, SourceID and AssertionHandle from the given byte array.
 void setValue(java.lang.String artifactString)
          Sets the value of this SAML artifact, and parses the TypeCode, SourceID and AssertionHandle from the given string.
 java.lang.String toString()
          Returns the base64-encoded artifact string.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

Artifact

public Artifact()
Creates a new Artifact instance with TypeCode = 0x0001 and null values for SourceID and AssertionHandle.

Artifact

public Artifact(byte[] sourceID,
                byte[] assertionHandle)
Creates a new Artifact instance with TypeCode = 0x0001 and the given SourceID and AssertionHandle.
Parameters:
sourceID - The identifier for the artifact's source site.
assertionHandle - The reference value for the assertion on the source site.
Throws:
java.lang.IllegalArgumentException - If the given source ID or assertion handle does not conform to the format defined in the SAML 1.0 specification.

Artifact

public Artifact(short typeCode,
                byte[] sourceID,
                byte[] assertionHandle)
Creates a new Artifact instance with the given TypeCode, SourceID and AssertionHandle.
Parameters:
typeCode - The type code for this artifact.
sourceID - The identifier for the artifact's source site.
assertionHandle - The reference value for the assertion on the source site.
Throws:
java.lang.IllegalArgumentException - If the given source ID or assertion handle does not conform to the format defined in the SAML 1.0 specification.

Artifact

public Artifact(java.lang.String artifactString)
Creates a new Artifact instance by parsing the TypeCode, SourceID and AssertionHandle from the given base64-encoded artifact string.
Parameters:
artifactString - A base64-encoded SAML artifact string that conforms to the format defined in the SAML 1.0 specification.
Throws:
java.lang.IllegalArgumentException - If the artifact does not conform to the format defined in the SAML 1.0 specification.

Artifact

public Artifact(byte[] artifactBytes)
Creates a new Artifact instance by parsing the TypeCode, SourceID and AssertionHandle from the given byte array.
Parameters:
artifactBytes - The bytes of a SAML artifact that conforms to the format defined in the SAML 1.0 specification.
Throws:
java.lang.IllegalArgumentException - If the artifact does not conform to the format defined in the SAML 1.0 specification.

Method Detail

getTypeCode

public short getTypeCode()
Returns the type code of this SAML artifact.
Returns:
The value of the TypeCode field of this artifact.

setTypeCode

public void setTypeCode(short typeCode)
Sets the type code of this SAML artifact.
Parameters:
typeCode - The type code for this artifact.

getSourceID

public byte[] getSourceID()
Returns the source ID of this SAML artifact.
Returns:
The value of the SourceID field, or null if none has been set.

setSourceID

public void setSourceID(byte[] sourceID)
Sets the source ID of this SAML artifact.
Parameters:
sourceID - The identifier for the artifact's source site.
Throws:
java.lang.IllegalArgumentException - If the given source ID does not conform to the format defined in the SAML 1.0 specification.

getAssertionHandle

public byte[] getAssertionHandle()
Returns the assertion handle of this SAML artifact.
Returns:
The value of the AssertionHandle field, or null if none has been set.

setAssertionHandle

public void setAssertionHandle(byte[] assertionHandle)
Sets the assertion handle of this SAML artifact.
Parameters:
assertionHandle - The reference value for the assertion on the source site.
Throws:
java.lang.IllegalArgumentException - If the given assertion handle does not conform to the format defined in the SAML 1.0 specification.

getBytes

public byte[] getBytes()
Returns the bytes of this SAML artifact.
Returns:
A byte array consisting of the concatenation of the TypeCode, SourceID (if present) and the AssertionHandle (if present).

toString

public java.lang.String toString()
Returns the base64-encoded artifact string.
Overrides:
toString in class java.lang.Object
Returns:
The base64 encoding of the bytes of this artifact.

setValue

public void setValue(byte[] artifactBytes)
Sets the value of this SAML artifact, and parses the TypeCode, SourceID and AssertionHandle from the given byte array.
Parameters:
artifactBytes - The bytes of a SAML artifact that conforms to the format defined in the SAML 1.0 specification.
Throws:
java.lang.IllegalArgumentException - If the artifact does not conform to the format defined in the SAML 1.0 specification.

setValue

public void setValue(java.lang.String artifactString)
Sets the value of this SAML artifact, and parses the TypeCode, SourceID and AssertionHandle from the given string.
Parameters:
artifactString - A base64-encoded SAML artifact string that conforms to the format defined in the SAML 1.0 specification.
Throws:
java.lang.IllegalArgumentException - If the artifact does not conform to the format defined in the SAML 1.0 specification.

Skip navigation links

Oracle Fusion Middleware SAML 1.0/1.1 Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10675-03


Copyright © 2005, 2011 , Oracle. All rights reserved.