X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cadi%2Faaf%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fcadi%2Foauth%2Ftest%2FJU_OAuthTest.java;h=a0a6c10d6325ce76ef5a22c793406542acf13e2c;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=6759d314cd0d1a25d3bcfb2011fb1e74b029baa8;hpb=4ac37bffd664bbc2d6d419d9420393193573320d;p=aaf%2Fauthz.git diff --git a/cadi/aaf/src/test/java/org/onap/aaf/cadi/oauth/test/JU_OAuthTest.java b/cadi/aaf/src/test/java/org/onap/aaf/cadi/oauth/test/JU_OAuthTest.java index 6759d314..a0a6c10d 100644 --- a/cadi/aaf/src/test/java/org/onap/aaf/cadi/oauth/test/JU_OAuthTest.java +++ b/cadi/aaf/src/test/java/org/onap/aaf/cadi/oauth/test/JU_OAuthTest.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. @@ -145,7 +145,7 @@ public class JU_OAuthTest { Assert.fail(rtt.code + ' ' + rtt.error); } } - + // ISAM Test if (true) { System.out.println("**** ISAM TEST ****"); @@ -156,7 +156,7 @@ public class JU_OAuthTest { tc = tcf.newClient(tokenServiceURL, 3000); tc.client_creds(client_id, client_secret); int at = username.indexOf('@'); - + tc.password(at>=0?username.substring(0, at):username,access.getProperty("cadi_password")); rtt = tc.getToken("org.osaaf.aaf","org.osaaf.test"); if (rtt.isOK()) { @@ -164,7 +164,7 @@ public class JU_OAuthTest { rtt = tc.refreshToken(rtt.value); if (rtt.isOK()) { print(rtt.value); - + tc = tcf.newClient(tokenAltIntrospectURL, 3000); tc.client_creds(client_id, client_secret); Result rti = tc.introspect(rtt.value.getAccessToken()); @@ -211,8 +211,8 @@ public class JU_OAuthTest { // Assert.fail(); } } - - + + // private TokenClient testROPCFlow(final String url, final String client_id, final String client_secret, String user, String password, final String ... scope) throws Exception { // TokenClient tclient = tcf.newClient(url,3000); // tclient.client_creds(client_id, client_secret); @@ -233,7 +233,7 @@ public class JU_OAuthTest { // } // return tclient; // } - + private String serviceCall(TzClient tzClient) throws Exception { return tzClient.best(new Retryable() { @Override @@ -263,7 +263,7 @@ public class JU_OAuthTest { t.getScope(), t.getRefreshToken()); } - + private void print(Introspect ti) { if (ti==null || ti.getClientId()==null) { System.out.println("Empty Introspect"); @@ -288,7 +288,7 @@ public class JU_OAuthTest { Chrono.timeStamp(exp), ti.getScope(), ti.getContent()==null?"":ti.getContent()); - + System.out.println(); } }