2 * Copyright 2001-2007 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file shibsp/attribute/AttributeDecoder.h
20 * Decodes SAML NameID/Attribute objects into resolved Attributes.
23 #ifndef __shibsp_attrdecoder_h__
24 #define __shibsp_attrdecoder_h__
26 #include <shibsp/attribute/Attribute.h>
27 #include <xmltooling/XMLObject.h>
32 * Decodes XML objects into resolved Attributes.
34 class SHIBSP_API AttributeDecoder
36 MAKE_NONCOPYABLE(AttributeDecoder);
40 virtual ~AttributeDecoder() {}
43 * Decodes an XMLObject into a resolved Attribute.
45 * @param id ID of resolved attribute
46 * @param xmlObject XMLObject to decode
47 * @return a resolved Attribute
49 virtual Attribute* decode(const char* id, const xmltooling::XMLObject* xmlObject) const=0;
52 /** Decodes SimpleAttributes */
53 #define SIMPLE_ATTRIBUTE_DECODER "Simple"
55 /** Decodes ScopedAttributes */
56 #define SCOPED_ATTRIBUTE_DECODER "Scoped"
58 /** Decodes NameIDAttributes */
59 #define NAMEID_ATTRIBUTE_DECODER "NameID"
61 /** Registers built-in AttributeDecoders into the runtime. */
62 void registerAttributeDecoders();
65 #endif /* __shibsp_attrdecoder_h__ */