2 * Copyright [2007] [University Corporation for Advanced Internet Development, Inc.]
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.
17 package edu.internet2.middleware.shibboleth.idp.profile;
19 import java.io.IOException;
20 import java.io.OutputStreamWriter;
22 import org.opensaml.ws.transport.InTransport;
23 import org.opensaml.ws.transport.OutTransport;
24 import org.slf4j.Logger;
25 import org.slf4j.LoggerFactory;
27 import edu.internet2.middleware.shibboleth.common.profile.provider.AbstractRequestURIMappedProfileHandler;
30 * A simple profile handler that returns the string "ok" if the IdP is able to answer the request. This may be used for
31 * very basic monitoring of the IdP.
33 public class StatusProfileHandler extends AbstractRequestURIMappedProfileHandler {
36 private final Logger log = LoggerFactory.getLogger(StatusProfileHandler.class);
39 public void processRequest(InTransport in, OutTransport out) {
40 log.warn("This profile handler has been deprecated, use the Status servlet usually located at '/idp/status'");
42 OutputStreamWriter writer = new OutputStreamWriter(out.getOutgoingStream());
45 } catch (IOException e) {
46 log.error("Unable to write response", e);