opensaml-3.0.1

Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
opensaml::SAMLArtifact Class Referenceabstract

Base class for SAML 1.x and 2.0 artifacts. More...

`#include <saml/binding/SAMLArtifact.h>`

Inheritance diagram for opensaml::SAMLArtifact:
[legend]
Collaboration diagram for opensaml::SAMLArtifact:
[legend]

## Public Member Functions
virtual std::string | encode () const
| Returns artifact encoded into null-terminated base64 for transmission.
virtual SAMLArtifact * | clone () const =0
| Builds a duplicate, independent artifact of the same type. More...
virtual std::string | getBytes () const
| Returns all of the raw binary data that makes up the artifact. More...
virtual std::string | getTypeCode () const
| Returns the binary type code of the artifact. More...
virtual std::string | getRemainingArtifact () const
| Returns the binary artifact data following the type code. More...
virtual std::string | getSource () const =0
| Returns a string that identifies the source of the artifact. More...
virtual std::string | getMessageHandle () const =0
| Returns the binary data that references the message (2.0) or assertion (1.x) The exact form this takes depends on the type. More...

## Static Public Member Functions
static SAMLArtifact * | parse (const char *s)
| Parses a base64-encoded null-terminated string into an artifact, if the type is known. More...
static SAMLArtifact * | parse (const XMLCh *s)
| Parses a base64-encoded null-terminated string into an artifact, if the type is known. More...
static std::string | toHex (const std::string &s)
| Converts binary data to hex notation. More...

## Static Public Attributes
static const unsigned int | TYPECODE_LENGTH
| Length of type code.

## Protected Member Functions
| SAMLArtifact (const char *s)
| Decodes a base64-encoded artifact into its raw form. More...
| SAMLArtifact (const SAMLArtifact &src)
| Copy constructor. More...

## Protected Attributes
std::string | m_raw
| Raw binary data that makes up an artifact.

## Detailed Description

Base class for SAML 1.x and 2.0 artifacts.

## Constructor & Destructor Documentation

## ◆ SAMLArtifact() [1/2]

opensaml::SAMLArtifact::SAMLArtifact | ( | const char * | s | ) |
| protected

Decodes a base64-encoded artifact into its raw form.

Parameters

  s | NULL-terminated base64-encoded string

## ◆ SAMLArtifact() [2/2]

opensaml::SAMLArtifact::SAMLArtifact | ( | const SAMLArtifact & | src | ) |
| protected

Copy constructor.

Parameters

  src | copy source

## Member Function Documentation

## ◆ clone()

virtual SAMLArtifact * opensaml::SAMLArtifact::clone | ( |  | ) | const
| pure virtual

Builds a duplicate, independent artifact of the same type.

Returns
  the new artifact

Implemented in opensaml::saml1p::SAMLArtifactType0001, opensaml::saml1p::SAMLArtifactType0002, and opensaml::saml2p::SAML2ArtifactType0004.

## ◆ getBytes()

virtual std::string opensaml::SAMLArtifact::getBytes | ( |  | ) | const
| virtual

Returns all of the raw binary data that makes up the artifact.

The result is NOT null-terminated.

Returns
  the binary artifact data

## ◆ getMessageHandle()

virtual std::string opensaml::SAMLArtifact::getMessageHandle | ( |  | ) | const
| pure virtual

Returns the binary data that references the message (2.0) or assertion (1.x) The exact form this takes depends on the type.

The result MAY contain embedded null characters.

Returns
  the binary reference data

Implemented in opensaml::saml1p::SAMLArtifactType0001, opensaml::saml1p::SAMLArtifactType0002, and opensaml::saml2p::SAML2ArtifactType0004.

## ◆ getRemainingArtifact()

virtual std::string opensaml::SAMLArtifact::getRemainingArtifact | ( |  | ) | const
| virtual

Returns the binary artifact data following the type code.

The result MAY contain embedded null characters.

Returns
  the binary artifact data

## ◆ getSource()

virtual std::string opensaml::SAMLArtifact::getSource | ( |  | ) | const
| pure virtual

Returns a string that identifies the source of the artifact.

The exact form this takes depends on the type but should match the syntax needed for metadata lookup.

Returns
  null-terminated source string

Implemented in opensaml::saml1p::SAMLArtifactType0001, opensaml::saml1p::SAMLArtifactType0002, and opensaml::saml2p::SAML2ArtifactType0004.

## ◆ getTypeCode()

virtual std::string opensaml::SAMLArtifact::getTypeCode | ( |  | ) | const
| virtual

Returns the binary type code of the artifact.

The result MAY contain embedded null characters.

Returns
  the binary type code

## ◆ parse() [1/2]

static SAMLArtifact * opensaml::SAMLArtifact::parse | ( | const char * | s | ) |
| static

Parses a base64-encoded null-terminated string into an artifact, if the type is known.

Parameters

  s | base64-encoded artifact

Returns
  the decoded artifact

## ◆ parse() [2/2]

static SAMLArtifact * opensaml::SAMLArtifact::parse | ( | const XMLCh * | s | ) |
| static

Parses a base64-encoded null-terminated string into an artifact, if the type is known.

Parameters

  s | base64-encoded artifact

Returns
  the decoded artifact

## ◆ toHex()

static std::string opensaml::SAMLArtifact::toHex | ( | const std::string & | s | ) |
| static

Converts binary data to hex notation.

Parameters

  s | the bytes to convert

Returns
  the data in hex form, 2 characters per byte

The documentation for this class was generated from the following file:

- saml/binding/SAMLArtifact.h