summaryrefslogtreecommitdiffstats
path: root/auth/auth-oauth
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-oauth')
-rw-r--r--auth/auth-oauth/pom.xml3
-rw-r--r--auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/AAF_OAuth.java17
2 files changed, 5 insertions, 15 deletions
diff --git a/auth/auth-oauth/pom.xml b/auth/auth-oauth/pom.xml
index 18f63281..89261ad5 100644
--- a/auth/auth-oauth/pom.xml
+++ b/auth/auth-oauth/pom.xml
@@ -92,7 +92,8 @@
<mainClass>org.onap.aaf.auth.oauth.AAF_OAuth</mainClass>
<name>oauth</name>
<commandLineArguments>
- <commandLineArgument>cadi_prop_files=${project.conf_dir}/org.osaaf.oauth.props</commandLineArgument>
+ <commandLineArgument>cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.oauth.props</commandLineArgument>
+ <commandLineArgument>cadi_log_dir=${project.ext_root_dir}/logs/oauth</commandLineArgument>
</commandLineArguments>
</program>
</programs>
diff --git a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/AAF_OAuth.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/AAF_OAuth.java
index 846d1a53..ecc2ae5b 100644
--- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/AAF_OAuth.java
+++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/AAF_OAuth.java
@@ -22,7 +22,6 @@
package org.onap.aaf.auth.oauth;
-import java.io.File;
import java.util.Map;
import javax.servlet.Filter;
@@ -59,8 +58,8 @@ import org.onap.aaf.cadi.oauth.TokenMgr;
import org.onap.aaf.cadi.oauth.TokenMgr.TokenPermLoader;
import org.onap.aaf.cadi.register.Registrant;
import org.onap.aaf.misc.env.APIException;
-import org.onap.aaf.misc.env.Env;
import org.onap.aaf.misc.env.Data.TYPE;
+import org.onap.aaf.misc.env.Env;
import com.datastax.driver.core.Cluster;
@@ -186,19 +185,9 @@ public class AAF_OAuth extends AbsService<AuthzEnv,AuthzTrans> {
public static void main(final String[] args) {
try {
- String propsFile = getArg(AAF_LOG4J_PREFIX, args, "org.osaaf")+".log4j.props";
- String log_dir = getArg(Config.CADI_LOGDIR,args,"./logs");
- String log_level = getArg(Config.CADI_LOGLEVEL,args,"INFO");
- File logs = new File(log_dir);
- if(!logs.isDirectory()) {
- logs.delete();
- }
- if(!logs.exists()) {
- logs.mkdirs();
- }
- Log4JLogIt logIt = new Log4JLogIt(log_dir,log_level,propsFile, "oauth");
+ Log4JLogIt logIt = new Log4JLogIt(args, "oauth");
PropAccess propAccess = new PropAccess(logIt,args);
-
+
AAF_OAuth service = new AAF_OAuth(new AuthzEnv(propAccess));
JettyServiceStarter<AuthzEnv,AuthzTrans> jss = new JettyServiceStarter<AuthzEnv,AuthzTrans>(service);
jss.start();