+++ /dev/null
-/*******************************************************************************\r
- * ============LICENSE_START====================================================\r
- * * org.onap.aaf\r
- * * ===========================================================================\r
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
- * * ===========================================================================\r
- * * Licensed under the Apache License, Version 2.0 (the "License");\r
- * * you may not use this file except in compliance with the License.\r
- * * You may obtain a copy of the License at\r
- * * \r
- * * http://www.apache.org/licenses/LICENSE-2.0\r
- * * \r
- * * Unless required by applicable law or agreed to in writing, software\r
- * * distributed under the License is distributed on an "AS IS" BASIS,\r
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * * See the License for the specific language governing permissions and\r
- * * limitations under the License.\r
- * * ============LICENSE_END====================================================\r
- * *\r
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
- * *\r
- ******************************************************************************/\r
-package org.onap.aaf.cadi.taf;\r
-\r
-import java.io.IOException;\r
-import java.security.Principal;\r
-\r
-import org.onap.aaf.cadi.Access;\r
-import org.onap.aaf.cadi.CadiException;\r
-\r
-/**\r
- * Response from Taf objects, which inform users what has happened and/or what should be done\r
- * \r
- *\r
- */\r
-public interface TafResp {\r
- public static enum RESP {\r
- IS_AUTHENTICATED, \r
- NO_FURTHER_PROCESSING, \r
- TRY_AUTHENTICATING, \r
- TRY_ANOTHER_TAF,\r
- FAIL, \r
- // A note was made to avoid the response REDIRECT. However, I have deemed that it is \r
- // unavoidable when the underlying TAF did do a REDIRECT, because it requires a HTTP\r
- // Service code to exit without modifying the Response any further.\r
- // Therefore, I have changed this to indicate what HAS happened, with should accommodate \r
- // both positions. JG 10/18/2012\r
-// public static final int HTTP_REDIRECT_INVOKED = 11;\r
- HTTP_REDIRECT_INVOKED,\r
- HAS_PROCESSED};\r
- \r
- /**\r
- * Basic success check\r
- * @return\r
- */\r
- public boolean isValid();\r
- \r
- /**\r
- * String description of what has occurred (for logging/exceptions)\r
- * @return\r
- */\r
- public String desc();\r
- \r
- /**\r
- * Check Response\r
- * @return\r
- */\r
- public RESP isAuthenticated();\r
-\r
- /**\r
- * Authenticate, returning FAIL or Other Valid indication\r
- * \r
- * HTTP implementations should watch for "HTTP_REDIRECT_INVOKED", and end the HTTP call appropriately.\r
- * @return\r
- * @throws CadiException \r
- */\r
- public RESP authenticate() throws IOException;\r
-\r
- /**\r
- * Once authenticated, this object should hold a Principal created from the authorization\r
- * @return\r
- */\r
- public Principal getPrincipal();\r
-\r
- /**\r
- * get the Access object which created this object, allowing the responder to appropriate Log, etc\r
- */\r
- public Access getAccess();\r
- \r
- /**\r
- * Be able to check if part of a Failed attempt\r
- */\r
- public boolean isFailedAttempt();\r
-}\r