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 * @param assertingParty name of the party asserting the attribute
48 * @param relyingParty name of the party relying on the attribute
49 * @return a resolved Attribute
51 virtual Attribute* decode(
52 const char* id, const xmltooling::XMLObject* xmlObject, const char* assertingParty=NULL, const char* relyingParty=NULL
56 /** Decodes SimpleAttributes */
57 #define SIMPLE_ATTRIBUTE_DECODER "Simple"
59 /** Decodes ScopedAttributes */
60 #define SCOPED_ATTRIBUTE_DECODER "Scoped"
62 /** Decodes NameIDAttributes */
63 #define NAMEID_ATTRIBUTE_DECODER "NameID"
65 /** Registers built-in AttributeDecoders into the runtime. */
66 void registerAttributeDecoders();
69 #endif /* __shibsp_attrdecoder_h__ */