From ca2ad52a2fbc4cffa9c32a49592c3461396e4def Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata@redhat.com>
Date: Thu, 1 Aug 2013 10:58:18 -0400
Subject: [PATCH] Reorganized interceptors.

The ACLInterceptor and AuthMethodInterceptor interceptors only run
on the server, so they have been moved from the base package into
the server package.
---
 base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java     | 4 ++--
 .../netscape/{certsrv/acls => cms/authorization}/ACLInterceptor.java | 3 ++-
 .../authentication => cms/authorization}/AuthMethodInterceptor.java  | 5 ++++-
 base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java   | 4 ++--
 base/ocsp/src/com/netscape/ocsp/OCSPApplication.java                 | 4 ++--
 base/tks/src/com/netscape/tks/TKSApplication.java                    | 4 ++--
 base/tps/java/org/dogtagpki/tps/server/TPSApplication.java           | 4 ++--
 7 files changed, 16 insertions(+), 12 deletions(-)
 rename base/common/src/com/netscape/{certsrv/acls => cms/authorization}/ACLInterceptor.java (98%)
 rename base/common/src/com/netscape/{certsrv/authentication => cms/authorization}/AuthMethodInterceptor.java (96%)

diff --git a/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java b/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java
index 7b45222d6377209da72a17a94156a794045bbafa..1b96f3121ce3fee1b1ce3b6ed921ba3fd9e3dab3 100644
--- a/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java
+++ b/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java
@@ -5,12 +5,12 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
-import com.netscape.certsrv.acls.ACLInterceptor;
 import com.netscape.certsrv.apps.CMS;
-import com.netscape.certsrv.authentication.AuthMethodInterceptor;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.PKIException;
+import com.netscape.cms.authorization.ACLInterceptor;
+import com.netscape.cms.authorization.AuthMethodInterceptor;
 import com.netscape.cms.servlet.account.AccountService;
 import com.netscape.cms.servlet.admin.GroupMemberService;
 import com.netscape.cms.servlet.admin.GroupService;
diff --git a/base/common/src/com/netscape/certsrv/acls/ACLInterceptor.java b/base/common/src/com/netscape/cms/authorization/ACLInterceptor.java
similarity index 98%
rename from base/common/src/com/netscape/certsrv/acls/ACLInterceptor.java
rename to base/common/src/com/netscape/cms/authorization/ACLInterceptor.java
index c30740260505ffc0223ac55b7658f57f02a53532..53160bb8cfada5a8deb5cf61f425d883371b14fb 100644
--- a/base/common/src/com/netscape/certsrv/acls/ACLInterceptor.java
+++ b/base/common/src/com/netscape/cms/authorization/ACLInterceptor.java
@@ -15,7 +15,7 @@
 //(C) 2012 Red Hat, Inc.
 //All rights reserved.
 //--- END COPYRIGHT BLOCK ---
-package com.netscape.certsrv.acls;
+package com.netscape.cms.authorization;
 
 import java.io.IOException;
 import java.lang.reflect.Method;
@@ -36,6 +36,7 @@ import org.jboss.resteasy.spi.Failure;
 import org.jboss.resteasy.spi.HttpRequest;
 import org.jboss.resteasy.spi.interception.PreProcessInterceptor;
 
+import com.netscape.certsrv.acls.ACLMapping;
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.authorization.AuthzToken;
diff --git a/base/common/src/com/netscape/certsrv/authentication/AuthMethodInterceptor.java b/base/common/src/com/netscape/cms/authorization/AuthMethodInterceptor.java
similarity index 96%
rename from base/common/src/com/netscape/certsrv/authentication/AuthMethodInterceptor.java
rename to base/common/src/com/netscape/cms/authorization/AuthMethodInterceptor.java
index 502c89307b2e457873dfbbbead890dae2b5a7cad..8d7bcb3c65dae8529aa20abebee7cb4851d60bb9 100644
--- a/base/common/src/com/netscape/certsrv/authentication/AuthMethodInterceptor.java
+++ b/base/common/src/com/netscape/cms/authorization/AuthMethodInterceptor.java
@@ -15,7 +15,7 @@
 //(C) 2013 Red Hat, Inc.
 //All rights reserved.
 //--- END COPYRIGHT BLOCK ---
-package com.netscape.certsrv.authentication;
+package com.netscape.cms.authorization;
 
 import java.io.IOException;
 import java.lang.reflect.Method;
@@ -38,6 +38,9 @@ import org.jboss.resteasy.spi.Failure;
 import org.jboss.resteasy.spi.HttpRequest;
 import org.jboss.resteasy.spi.interception.PreProcessInterceptor;
 
+import com.netscape.certsrv.authentication.AuthMethodMapping;
+import com.netscape.certsrv.authentication.AuthToken;
+import com.netscape.certsrv.authentication.IAuthToken;
 import com.netscape.certsrv.base.ForbiddenException;
 import com.netscape.cmscore.realm.PKIPrincipal;
 
diff --git a/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java b/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
index 6b7f3e2cfd148ea20f0d90297750d0c4895cc3bb..f04ee9bb57607c4e12f9f17e2edf4600d2666626 100644
--- a/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
+++ b/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
@@ -5,9 +5,9 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
-import com.netscape.certsrv.acls.ACLInterceptor;
-import com.netscape.certsrv.authentication.AuthMethodInterceptor;
 import com.netscape.certsrv.base.PKIException;
+import com.netscape.cms.authorization.ACLInterceptor;
+import com.netscape.cms.authorization.AuthMethodInterceptor;
 import com.netscape.cms.servlet.account.AccountService;
 import com.netscape.cms.servlet.admin.GroupMemberService;
 import com.netscape.cms.servlet.admin.GroupService;
diff --git a/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java b/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java
index 3a8737856b22bf3e922380944f3e5d8eb46d0456..1dc4a9df1b19400ddcf2625c4742dd6cd61f09cb 100644
--- a/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java
+++ b/base/ocsp/src/com/netscape/ocsp/OCSPApplication.java
@@ -5,9 +5,9 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
-import com.netscape.certsrv.acls.ACLInterceptor;
-import com.netscape.certsrv.authentication.AuthMethodInterceptor;
 import com.netscape.certsrv.base.PKIException;
+import com.netscape.cms.authorization.ACLInterceptor;
+import com.netscape.cms.authorization.AuthMethodInterceptor;
 import com.netscape.cms.servlet.account.AccountService;
 import com.netscape.cms.servlet.admin.GroupMemberService;
 import com.netscape.cms.servlet.admin.GroupService;
diff --git a/base/tks/src/com/netscape/tks/TKSApplication.java b/base/tks/src/com/netscape/tks/TKSApplication.java
index 1ff193058a8d2c64b2ae470df0d3528f2d425d80..b2d43ae87b7c47c519f777d93eb741c6257afa76 100644
--- a/base/tks/src/com/netscape/tks/TKSApplication.java
+++ b/base/tks/src/com/netscape/tks/TKSApplication.java
@@ -5,9 +5,9 @@ import java.util.Set;
 
 import javax.ws.rs.core.Application;
 
-import com.netscape.certsrv.acls.ACLInterceptor;
-import com.netscape.certsrv.authentication.AuthMethodInterceptor;
 import com.netscape.certsrv.base.PKIException;
+import com.netscape.cms.authorization.ACLInterceptor;
+import com.netscape.cms.authorization.AuthMethodInterceptor;
 import com.netscape.cms.servlet.account.AccountService;
 import com.netscape.cms.servlet.admin.GroupMemberService;
 import com.netscape.cms.servlet.admin.GroupService;
diff --git a/base/tps/java/org/dogtagpki/tps/server/TPSApplication.java b/base/tps/java/org/dogtagpki/tps/server/TPSApplication.java
index 2f2b2a63ab5fac290950df8d15152efe941e0bd1..fc3c18ee21bab32ec744e15705087dd73ea1560b 100644
--- a/base/tps/java/org/dogtagpki/tps/server/TPSApplication.java
+++ b/base/tps/java/org/dogtagpki/tps/server/TPSApplication.java
@@ -24,9 +24,9 @@ import javax.ws.rs.core.Application;
 
 import org.dogtagpki.tps.token.TokenService;
 
-import com.netscape.certsrv.acls.ACLInterceptor;
-import com.netscape.certsrv.authentication.AuthMethodInterceptor;
 import com.netscape.certsrv.base.PKIException;
+import com.netscape.cms.authorization.ACLInterceptor;
+import com.netscape.cms.authorization.AuthMethodInterceptor;
 import com.netscape.cms.servlet.account.AccountService;
 import com.netscape.cms.servlet.admin.GroupMemberService;
 import com.netscape.cms.servlet.admin.GroupService;
-- 
1.8.1.4

