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/handler/Handler.h
20 * Pluggable runtime functionality that implement protocols and services
23 #ifndef __shibsp_handler_h__
24 #define __shibsp_handler_h__
26 #include <shibsp/util/PropertySet.h>
30 class SHIBSP_API SPRequest;
33 * Pluggable runtime functionality that implement protocols and services
35 class SHIBSP_API Handler : public virtual PropertySet
37 MAKE_NONCOPYABLE(Handler);
44 * Executes handler functionality as an incoming request.
46 * <p>Handlers can be run either directly by incoming web requests
47 * or indirectly/implicitly during other SP processing.
49 * @param request SP request context
50 * @param isHandler true iff executing in the context of a direct handler invocation
51 * @return a pair containing a "request completed" indicator and a server-specific response code
53 virtual std::pair<bool,long> run(SPRequest& request, bool isHandler=true) const=0;
56 /** Registers Handler implementations. */
57 void SHIBSP_API registerHandlers();
59 /** SessionInitiator that iterates through a set of protocol-specific versions. */
60 #define CHAINING_SESSION_INITIATOR "Chaining"
62 /** SessionInitiator that supports Shibboleth V1 AuthnRequest/WAYF redirects. */
63 #define SHIB1_SESSION_INITIATOR "Shibboleth"
66 #endif /* __shibsp_handler_h__ */