2 * ============LICENSE_START====================================================
4 * ===========================================================================
5 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6 * ===========================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END====================================================
22 package org.onap.aaf.auth.env;
24 import java.util.Date;
26 import javax.servlet.http.HttpServletRequest;
28 import org.onap.aaf.auth.org.Organization;
29 import org.onap.aaf.cadi.Lur;
30 import org.onap.aaf.cadi.Permission;
31 import org.onap.aaf.cadi.principal.TaggedPrincipal;
32 import org.onap.aaf.misc.env.LogTarget;
33 import org.onap.aaf.misc.env.TransStore;
35 public interface AuthzTrans extends TransStore {
36 public enum REQD_TYPE {future(1),force(2),move(4),ns(8),detail(16);
44 public abstract AuthzTrans set(HttpServletRequest req);
46 public abstract HttpServletRequest hreq();
48 public abstract String user();
50 public abstract void setUser(TaggedPrincipal p);
52 public abstract TaggedPrincipal getUserPrincipal();
54 public abstract String ip();
56 public abstract int port();
58 public abstract String meth();
60 public abstract String path();
62 public abstract String agent();
64 public abstract AuthzEnv env();
66 public abstract void setLur(Lur lur);
68 public abstract boolean fish(Permission ... p);
70 public abstract Organization org();
72 public abstract boolean requested(REQD_TYPE requested);
74 public void requested(REQD_TYPE requested, boolean b);
76 public abstract void logAuditTrail(LogTarget lt);
78 public abstract Date now();