summaryrefslogtreecommitdiffstats
path: root/cadi/oauth-enduser/src/test
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-09-07 13:43:23 -0500
committerInstrumental <jonathan.gathman@att.com>2018-09-07 13:43:26 -0500
commit7e966914050e66219689001ff4ab601a49eef0ac (patch)
treeb1bf643f2d191207adc7d9f6b41ac20f56083e76 /cadi/oauth-enduser/src/test
parentead32f193586e39b59bb366bddf70e665173a52d (diff)
Mass whitespace changes (Style Warnings)
Issue-ID: AAF-473 Change-Id: Ia1b3825a527bd56299949b5962bb9354dffbeef8 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi/oauth-enduser/src/test')
-rw-r--r--cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/OAuthExample.java12
-rw-r--r--cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/OnapClientExample.java10
-rw-r--r--cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/SimpleRestClientExample.java10
3 files changed, 16 insertions, 16 deletions
diff --git a/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/OAuthExample.java b/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/OAuthExample.java
index 154ba1b7..cd9c2313 100644
--- a/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/OAuthExample.java
+++ b/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/OAuthExample.java
@@ -94,7 +94,7 @@ public class OAuthExample {
// If AAF Token server, then its just the same as your other AAF MechID creds
// If it is the Alternate OAUTH, you'll need THOSE credentials. See that tool's Onboarding procedures.
String client_id = access.getProperty(Config.AAF_APPID);
- if(client_id==null) {
+ if (client_id==null) {
// For AAF, client_id CAN be Certificate. This is not necessarily true elsewhere
client_id = access.getProperty(Config.CADI_ALIAS);
}
@@ -126,7 +126,7 @@ public class OAuthExample {
// tc.clearToken("org.onap.aaf","org.onap.test");
// Result Object can be queried for success
- if(rtt.isOK()) {
+ if (rtt.isOK()) {
TimedToken token = rtt.value;
print(token); // Take a look at what's in a Token
@@ -147,7 +147,7 @@ public class OAuthExample {
// The "future" calling method allows you to do other processing, such as call more than one backend
// client before picking up the result
// If "get" matches the HTTP Code for the method (i.e. read HTTP Return value is 200), then
- if(future.get(CALL_TIMEOUT)) {
+ if (future.get(CALL_TIMEOUT)) {
// Client Returned expected value
return future.value;
} else {
@@ -165,7 +165,7 @@ public class OAuthExample {
// As a Service, read Introspection information as proof of Authenticated Authorization
//////////////////////////////////////////////////////////////////////
// CADI Framework (i.e. CadiFilter) works with the Introspection to drive the J2EE interfaces (
- // i.e. if(isUserInRole("ns.perm|instance|action")) {...
+ // i.e. if (isUserInRole("ns.perm|instance|action")) {...
//
// Here, however, is a way to introspect via Java
//
@@ -174,7 +174,7 @@ public class OAuthExample {
TokenClient tci = tcf.newClient(tokenIntrospectURL);
tci.client_creds(client_id, client_secret);
Result<Introspect> is = tci.introspect(token.getAccessToken());
- if(is.isOK()) {
+ if (is.isOK()) {
// Note that AAF will add JSON set of Permissions as part of "Content:", legitimate extension of OAuth Structure
print(is.value); // do something with Introspect Object
} else {
@@ -206,7 +206,7 @@ public class OAuthExample {
}
private static void print(Introspect ti) {
- if(ti==null || ti.getClientId()==null) {
+ if (ti==null || ti.getClientId()==null) {
System.out.println("Empty Introspect");
return;
}
diff --git a/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/OnapClientExample.java b/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/OnapClientExample.java
index 657a9b78..f4fe017f 100644
--- a/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/OnapClientExample.java
+++ b/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/OnapClientExample.java
@@ -97,7 +97,7 @@ public class OnapClientExample {
// tc.clearToken("org.onap.aaf","org.onap.test");
// Result Object can be queried for success
- if(rtt.isOK()) {
+ if (rtt.isOK()) {
TimedToken token = rtt.value;
print(token); // Take a look at what's in a Token
@@ -122,7 +122,7 @@ public class OnapClientExample {
// The "future" calling method allows you to do other processing, such as call more than one backend
// client before picking up the result
// If "get" matches the HTTP Code for the method (i.e. read HTTP Return value is 200), then
- if(future.get(CALL_TIMEOUT)) {
+ if (future.get(CALL_TIMEOUT)) {
// Client Returned expected value
return future.value;
} else {
@@ -140,7 +140,7 @@ public class OnapClientExample {
// As a Service, read Introspection information as proof of Authenticated Authorization
//////////////////////////////////////////////////////////////////////
// CADI Framework (i.e. CadiFilter) works with the Introspection to drive the J2EE interfaces (
- // i.e. if(isUserInRole("ns.perm|instance|action")) {...
+ // i.e. if (isUserInRole("ns.perm|instance|action")) {...
//
// Here, however, is a way to introspect via Java
//
@@ -148,7 +148,7 @@ public class OnapClientExample {
// We need a Different Introspect TokenClient, because different Endpoint (and usually different Services)
TokenClient tci = tcf.newClient(Config.AAF_OAUTH2_INTROSPECT_URL);
Result<Introspect> is = tci.introspect(token.getAccessToken());
- if(is.isOK()) {
+ if (is.isOK()) {
// Note that AAF will add JSON set of Permissions as part of "Content:", legitimate extension of OAuth Structure
print(is.value); // do something with Introspect Object
} else {
@@ -180,7 +180,7 @@ public class OnapClientExample {
}
private static void print(Introspect ti) {
- if(ti==null || ti.getClientId()==null) {
+ if (ti==null || ti.getClientId()==null) {
System.out.println("Empty Introspect");
return;
}
diff --git a/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/SimpleRestClientExample.java b/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/SimpleRestClientExample.java
index 27f9198a..dc1824fc 100644
--- a/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/SimpleRestClientExample.java
+++ b/cadi/oauth-enduser/src/test/java/org/onap/aaf/cadi/enduser/test/SimpleRestClientExample.java
@@ -42,7 +42,7 @@ public class SimpleRestClientExample {
String urlString = cf.getAccess().getProperty("myurl", null);
- if(urlString==null) {
+ if (urlString==null) {
System.out.println("Note: In your startup, add \"myurl=https://<aaf hello machine>:8130\" to command line\n\t"
+ "OR\n\t"
+ " add -Dmyurl=https://<aaf hello machine>:8130 to VM Args\n\t"
@@ -64,8 +64,8 @@ public class SimpleRestClientExample {
PrintWriter pw = input.writer();
pw.print("{\"something\": [");
- for(int i=0;i<4;++i) {
- if(i>0) {
+ for (int i=0;i<4;++i) {
+ if (i>0) {
pw.print(',');
}
pw.print("{\"myint\":");
@@ -136,14 +136,14 @@ public class SimpleRestClientExample {
System.out.println("-------- START Expecting Exception starting here --------");
expectException = true;
restClient.get("notAnAPI");
- } catch(RESTException e) {
+ } catch (RESTException e) {
System.out.println(e.getCode());
System.out.println(e.getMsg());
System.out.println(e.getMessage());
System.out.println(e.getLocalizedMessage());
System.out.println(e);
} finally {
- if(expectException) {
+ if (expectException) {
System.out.println("-------- END Expecting Exception starting here --------");
}
System.out.println("-------- END REST READ/GET --------");