Mass removal of all Tabs (Style Warnings)
[aaf/authz.git] / auth / auth-oauth / src / main / java / org / onap / aaf / auth / oauth / mapper / MapperIntrospect1_0.java
index 00a94fd..ac015c8 100644 (file)
@@ -31,44 +31,44 @@ import aafoauth.v2_0.Introspect;
 
 public class MapperIntrospect1_0 implements MapperIntrospect<Introspect> {
 
-       public Result<Introspect> introspect(Result<Data> rs) {
-               if(rs.isOKhasData()) {
-                       Data data = rs.value;
-                       Introspect ti = new Introspect();
-                       ti.setAccessToken(data.id);
-                       ti.setActive(data.active);
-                       ti.setClientId(data.client_id);
-                       for(CLIENT_TYPE ct : CLIENT_TYPE.values()) {
-                               if(data.type==ct.ordinal()) {
-                                       ti.setClientType(ct.name());
-                                       break;
-                               }
-                       }
-                       if(ti.getClientType()==null) {
-                               ti.setClientType(CLIENT_TYPE.unknown.name());
-                       }
-                       ti.setActive(data.active);
-                       ti.setScope(getScopes(data.scopes(false)));
-                       ti.setContent(data.content);
-                       ti.setUsername(data.user);
-                       ti.setExp(data.exp_sec); // want seconds from Jan 1, 1970
-                       return Result.ok(ti);
-               }
-               return Result.err(rs);
-       }
-       
-       protected static String getScopes(Set<String> scopes) {
-               StringBuilder sb = new StringBuilder();
-               boolean start = true;
-               for(String s : scopes) {
-                       if(start) {
-                               start = false;
-                       } else {
-                               sb.append(' ');
-                       }
-                       sb.append(s);
-               }
-               return sb.toString();
-       }
+    public Result<Introspect> introspect(Result<Data> rs) {
+        if(rs.isOKhasData()) {
+            Data data = rs.value;
+            Introspect ti = new Introspect();
+            ti.setAccessToken(data.id);
+            ti.setActive(data.active);
+            ti.setClientId(data.client_id);
+            for(CLIENT_TYPE ct : CLIENT_TYPE.values()) {
+                if(data.type==ct.ordinal()) {
+                    ti.setClientType(ct.name());
+                    break;
+                }
+            }
+            if(ti.getClientType()==null) {
+                ti.setClientType(CLIENT_TYPE.unknown.name());
+            }
+            ti.setActive(data.active);
+            ti.setScope(getScopes(data.scopes(false)));
+            ti.setContent(data.content);
+            ti.setUsername(data.user);
+            ti.setExp(data.exp_sec); // want seconds from Jan 1, 1970
+            return Result.ok(ti);
+        }
+        return Result.err(rs);
+    }
+    
+    protected static String getScopes(Set<String> scopes) {
+        StringBuilder sb = new StringBuilder();
+        boolean start = true;
+        for(String s : scopes) {
+            if(start) {
+                start = false;
+            } else {
+                sb.append(' ');
+            }
+            sb.append(s);
+        }
+        return sb.toString();
+    }
 
 }