summaryrefslogtreecommitdiffstats
path: root/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java')
-rw-r--r--auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java
index d4852c1a..ddc306c4 100644
--- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java
+++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.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.
@@ -49,7 +49,7 @@ public class Mapper1_0 extends MapperIntrospect1_0 implements Mapper<TokenReques
@Override
public Class<?> getClass(API api) {
switch(api) {
- case TOKEN_REQ: return TokenRequest.class;
+ case TOKEN_REQ: return TokenRequest.class;
case TOKEN: return Token.class;
case INTROSPECT: return Introspect.class;
case ERROR: return Error.class;
@@ -134,12 +134,12 @@ public class Mapper1_0 extends MapperIntrospect1_0 implements Mapper<TokenReques
}
break;
- }
+ }
}
return data?tr:null;
}
-
-
+
+
/* (non-Javadoc)
* @see org.onap.aaf.auth.oauth.mapper.Mapper#credsFromReq(javax.servlet.http.HttpServletRequest)
@@ -156,19 +156,19 @@ public class Mapper1_0 extends MapperIntrospect1_0 implements Mapper<TokenReques
@Override
public Data clientTokenReq(TokenRequest tokReq, Holder<GRANT_TYPE> hgt) {
OAuthTokenDAO.Data tdd = new OAuthTokenDAO.Data();
- tdd.client_id = tokReq.getClientId();
+ tdd.client_id = tokReq.getClientId();
tdd.user = tokReq.getUsername();
if (tokReq.getRefreshToken()!=null) {
tdd.refresh=tokReq.getRefreshToken();
}
-
+
for (GRANT_TYPE ttt : GRANT_TYPE.values()) {
if (ttt.name().equals(tokReq.getGrantType())) {
hgt.set(ttt);
break;
}
}
-
+
switch(hgt.get()) {
case client_credentials:
case password:
@@ -179,14 +179,14 @@ public class Mapper1_0 extends MapperIntrospect1_0 implements Mapper<TokenReques
tdd.type = CLIENT_TYPE.unknown.ordinal();
break;
}
- String scopes=tokReq.getScope();
+ String scopes=tokReq.getScope();
if (scopes!=null) {
Set<String> ss = tdd.scopes(true);
for (String s: Split.split(' ', tokReq.getScope())) {
ss.add(s);
}
}
-
+
tdd.state = tokReq.getState();
return tdd;
}