2 * Licensed to the University Corporation for Advanced Internet
3 * Development, Inc. (UCAID) under one or more contributor license
4 * agreements. See the NOTICE file distributed with this work for
5 * additional information regarding copyright ownership.
7 * UCAID licenses this file to you under the Apache License,
8 * Version 2.0 (the "License"); you may not use this file except
9 * in compliance with the License. You may obtain a copy of the
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17 * either express or implied. See the License for the specific
18 * language governing permissions and limitations under the License.
22 * @file saml/saml2/binding/SAML2ArtifactType0004.h
24 * Type 0x0004 SAML 2.0 artifact class.
27 #ifndef __saml_artifacttype0004_h__
28 #define __saml_artifacttype0004_h__
30 #include <saml/saml2/binding/SAML2Artifact.h>
36 * Type 0x0004 SAML 2.0 artifact class.
38 class SAML_API SAML2ArtifactType0004 : public SAML2Artifact
40 SAML2ArtifactType0004& operator=(const SAML2ArtifactType0004& src);
43 * Decodes a base64-encoded type 0x0004 artifact
45 * @param s NULL-terminated base64-encoded string
47 SAML2ArtifactType0004(const char* s);
50 * Constructs an artifact with the specified source ID and index, but a random message handle.
52 * @param sourceid SOURCEID_LENGTH bytes of binary data
53 * @param index endpoint index
55 SAML2ArtifactType0004(const std::string& sourceid, int index);
58 * Constructs an artifact with the specified source ID and assertion handle.
60 * @param sourceid SOURCEID_LENGTH bytes of binary data
61 * @param index endpoint index
62 * @param handle HANDLE_LENGTH bytes of binary data
64 SAML2ArtifactType0004(const std::string& sourceid, int index, const std::string& handle);
66 virtual ~SAML2ArtifactType0004();
68 // Virtual function overrides.
69 SAML2ArtifactType0004* clone() const;
70 std::string getSource() const;
71 std::string getMessageHandle() const;
74 * Returns the binary data that identifies the source.
75 * The result MAY contain embedded null characters.
77 * @return the binary source ID
79 virtual std::string getSourceID() const;
81 /** Length of source ID */
82 static const unsigned int SOURCEID_LENGTH;
84 /** Length of message handle */
85 static const unsigned int HANDLE_LENGTH;
91 * @param src object to copy
93 SAML2ArtifactType0004(const SAML2ArtifactType0004& src);
99 #endif /* __saml_artifacttype0004_h__ */