X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=shibsp%2FSPRequest.h;h=7187be827fec3ce9c25c5120910548e6fd90cc38;hb=7a8806efca2d7135ef9a3900b47329dbc5674f72;hp=255e8b5d32bf6261a25e37d375596e0ddbe66e1f;hpb=0e2564a8848b7b5d01aee73ee1744d8fa4174a13;p=shibboleth%2Fcpp-sp.git diff --git a/shibsp/SPRequest.h b/shibsp/SPRequest.h index 255e8b5..7187be8 100644 --- a/shibsp/SPRequest.h +++ b/shibsp/SPRequest.h @@ -1,23 +1,27 @@ -/* - * Copyright 2001-2007 Internet2 +/** + * 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. * - * Licensed 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 + * 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 + * 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. + * 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/SPRequest.h * - * Interface to server request being processed + * Interface to server request being processed. */ #ifndef __shibsp_req_h__ @@ -45,9 +49,9 @@ namespace shibsp { class SHIBSP_API SPRequest : public virtual xmltooling::HTTPRequest, public virtual xmltooling::HTTPResponse { protected: - SPRequest() {} + SPRequest(); public: - virtual ~SPRequest() {} + virtual ~SPRequest(); /** * Returns the locked ServiceProvider processing the request. @@ -77,7 +81,7 @@ namespace shibsp { * @param checkTimeout true iff the last-used timestamp should be updated and any timeout policy enforced * @param ignoreAddress true iff all address checking should be ignored, regardless of policy * @param cache true iff the request should hold the Session lock itself and unlock during cleanup - * @return pointer to Session, or NULL + * @return pointer to Session, or nullptr */ virtual Session* getSession(bool checkTimeout=true, bool ignoreAddress=false, bool cache=true)=0; @@ -88,7 +92,7 @@ namespace shibsp { * @param resource resource URL to compute handler for * @return base location of handler */ - virtual const char* getHandlerURL(const char* resource=NULL) const=0; + virtual const char* getHandlerURL(const char* resource=nullptr) const=0; /** * Returns a non-spoofable request header value, if possible. @@ -98,9 +102,7 @@ namespace shibsp { * @param name the name of the secure header to return * @return the header's value, or an empty string */ - virtual std::string getSecureHeader(const char* name) const { - return getHeader(name); - } + virtual std::string getSecureHeader(const char* name) const; /** * Ensures no value exists for a request header. @@ -121,17 +123,16 @@ namespace shibsp { /** * Establish REMOTE_USER identity in request. * - * @param user REMOTE_USER value to set or NULL to clear + * @param user REMOTE_USER value to set or nullptr to clear */ virtual void setRemoteUser(const char* user)=0; /** * Establish AUTH_TYPE for request. * - * @param authtype AUTH_TYPE value to set or NULL to clear + * @param authtype AUTH_TYPE value to set or nullptr to clear */ - virtual void setAuthType(const char* authtype) { - } + virtual void setAuthType(const char* authtype); /** Portable logging levels. */ enum SPLogLevel {