/usr/include/shibsp/attribute/AttributeDecoder.h is in libshibsp-dev 2.4.3+dfsg-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | /**
* Licensed to the University Corporation for Advanced Internet
* Development, Inc. (UCAID) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* UCAID licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the License.
*/
/**
* @file shibsp/attribute/AttributeDecoder.h
*
* Decodes SAML NameID/Attribute objects into resolved Attributes.
*/
#ifndef __shibsp_attrdecoder_h__
#define __shibsp_attrdecoder_h__
#include <shibsp/base.h>
#include <string>
#include <vector>
namespace xmltooling {
class XMLTOOL_API QName;
class XMLTOOL_API XMLObject;
};
namespace shibsp {
class SHIBSP_API Attribute;
/**
* Decodes XML objects into resolved Attributes.
*/
class SHIBSP_API AttributeDecoder
{
MAKE_NONCOPYABLE(AttributeDecoder);
protected:
/**
* Constructor.
*
* @param e root of DOM to configure the decoder
*/
AttributeDecoder(const xercesc::DOMElement* e);
/** Flag for case sensitivity of decoded attributes. */
bool m_caseSensitive;
/** Flag for hiding attributes from CGI export. */
bool m_internal;
/** Hash algorithm to apply to decoded values. */
std::string m_hashAlg;
/**
* Helper method to handle base class decoding housekeeping.
*
* @param attr the new Attribute object being created
* @return the attr parameter
*/
virtual Attribute* _decode(Attribute* attr) const;
public:
virtual ~AttributeDecoder();
/**
* Decodes an XMLObject into a resolved Attribute.
*
* @param ids array containing primary identifier in first position, followed by any aliases
* @param xmlObject XMLObject to decode
* @param assertingParty name of the party asserting the attribute
* @param relyingParty name of the party relying on the attribute
* @return a resolved Attribute, or nullptr
*/
virtual Attribute* decode(
const std::vector<std::string>& ids,
const xmltooling::XMLObject* xmlObject,
const char* assertingParty=nullptr,
const char* relyingParty=nullptr
) const=0;
};
/** Decodes into a SimpleAttribute. */
extern SHIBSP_API xmltooling::QName StringAttributeDecoderType;
/** Decodes scoped and NameID attributes into a ScopedAttribute. */
extern SHIBSP_API xmltooling::QName ScopedAttributeDecoderType;
/** Decodes NameID information into a NameIDAttribute. */
extern SHIBSP_API xmltooling::QName NameIDAttributeDecoderType;
/** Decodes scoped attributes into a NameIDAttribute. */
extern SHIBSP_API xmltooling::QName NameIDFromScopedAttributeDecoderType;
/** Decodes KeyInfo information into a SimpleAttribute. */
extern SHIBSP_API xmltooling::QName KeyInfoAttributeDecoderType;
/** Decodes arbitrary DOM information into an ExtensibleAttribute. */
extern SHIBSP_API xmltooling::QName DOMAttributeDecoderType;
/** Decodes arbitrary XML into an XMLAttribute. */
extern SHIBSP_API xmltooling::QName XMLAttributeDecoderType;
/** Decodes base64-encoded data into a SimpleAttribute. */
extern SHIBSP_API xmltooling::QName Base64AttributeDecoderType;
/** Registers built-in AttributeDecoders into the runtime. */
void registerAttributeDecoders();
};
#endif /* __shibsp_attrdecoder_h__ */
|