X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-gui%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fgui%2FAAF_GUI.java;h=d55047a3c587546db194e53b231dec4c436c93e6;hb=a3cbab8be520b0d20a2bceb3441392df7a194b7f;hp=17916c2447aa13e76a6ae33aafc51fb2fdf095bf;hpb=2c3cb70208785cf0272eae075206074318ca74cc;p=aaf%2Fauthz.git diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/AAF_GUI.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/AAF_GUI.java index 17916c24..d55047a3 100644 --- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/AAF_GUI.java +++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/AAF_GUI.java @@ -7,9 +7,9 @@ * 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 - * + * * 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. @@ -103,10 +103,10 @@ public class AAF_GUI extends AbsService implements State artifactsDF; public RosettaDF certInfoDF; @@ -114,8 +114,8 @@ public class AAF_GUI extends AbsService implements State implements State implements State implements State(null, "Clear"){ - @Override - public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception { - trans.clearCache(); - Cookie cookies[] = req.getCookies(); - if(cookies!=null) { - for(Cookie c : cookies) { - if(c.getName().startsWith("aaf.gui.")) { - c.setMaxAge(0); - resp.addCookie(c); - } - } - } - resp.sendRedirect("/gui/home"); - } + @Override + public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception { + trans.clearCache(); + Cookie cookies[] = req.getCookies(); + if(cookies!=null) { + for(Cookie c : cookies) { + if(c.getName().startsWith("aaf.gui.")) { + c.setMaxAge(0); + resp.addCookie(c); + } + } + } + resp.sendRedirect("/gui/home"); + } }, "text/plain;charset=utf-8","*/*"); - - /////////////////////// + + /////////////////////// // WebContent Handler /////////////////////// CachingFileAccess cfa = new CachingFileAccess(env); - //route(env,GET,"/"+env.get(sThemeWebPath)+"/:key*", cfa); route(env,GET,"/theme/:key*", cfa); /////////////////////// aafCon = aafCon(); lur = aafCon.newLur(); } - + public RosettaDF getDF(Class cls) throws APIException { return Cmd.getDF(env,cls); } - + public void writeError(AuthzTrans trans, Future fp, HTMLGen hgen, int indent) { if (hgen!=null) { String msg = aafCon.readableErrMsg(fp); @@ -254,9 +253,9 @@ public class AAF_GUI extends AbsService implements State RET cmClientAsUser(TaggedPrincipal p,Retryable retryable) throws APIException, LocatorException, CadiException { - return cmCon.hman().best(new HTransferSS(p,app, aafCon.securityInfo()), retryable); + return cmCon.hman().best(new HTransferSS(p, APP, aafCon.securityInfo()), retryable); } - + @Override public Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException { try { @@ -287,11 +286,11 @@ public class AAF_GUI extends AbsService implements State( - new AAF_GUI(new AuthzEnv(propAccess)),true) - .start(); - } catch (Exception e) { - propAccess.log(e); - } + new AAF_GUI(new AuthzEnv(propAccess)),true) + .start(); + } catch (Exception e) { + propAccess.log(e); + } } catch (Exception e) { e.printStackTrace(); }