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);
44 public abstract AuthzTrans set(HttpServletRequest req);
46 public abstract String user();
48 public abstract void setUser(TaggedPrincipal p);
50 public abstract TaggedPrincipal getUserPrincipal();
52 public abstract String ip();
54 public abstract int port();
56 public abstract String meth();
58 public abstract String path();
60 public abstract String agent();
62 public abstract AuthzEnv env();
64 public abstract void setLur(Lur lur);
66 public abstract boolean fish(Permission ... p);
68 public abstract Organization org();
70 public abstract boolean requested(REQD_TYPE requested);
72 public void requested(REQD_TYPE requested, boolean b);
74 public abstract void logAuditTrail(LogTarget lt);
76 public abstract Date now();