mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix formatting issues
This commit is contained in:
parent
59cd06df0f
commit
291249f80f
@ -622,7 +622,7 @@ public class HandlerUtil {
|
||||
log.error("Unauthorized, You are not logged in. Please log in to the portal");
|
||||
return constructProxyResponseByErrorCode(HttpStatus.SC_UNAUTHORIZED);
|
||||
}
|
||||
if(!isDefaultAuthToken){
|
||||
if (!isDefaultAuthToken) {
|
||||
httpRequest.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BEARER + authData.getAccessToken());
|
||||
ProxyResponse proxyResponse = HandlerUtil.execute(httpRequest);
|
||||
if (proxyResponse.getExecutorResponse().contains(HandlerConstants.EXECUTOR_EXCEPTION_PREFIX)) {
|
||||
@ -660,7 +660,7 @@ public class HandlerUtil {
|
||||
// handleError(resp, HttpStatus.SC_UNAUTHORIZED);
|
||||
return tokenResultResponse;
|
||||
}
|
||||
if(isDefaultAuthToken){
|
||||
if (isDefaultAuthToken) {
|
||||
authData = (AuthData) session.getAttribute(HandlerConstants.SESSION_DEFAULT_AUTH_DATA_KEY);
|
||||
} else {
|
||||
authData = (AuthData) session.getAttribute(HandlerConstants.SESSION_AUTH_DATA_KEY);
|
||||
@ -676,7 +676,7 @@ public class HandlerUtil {
|
||||
JsonElement jTokenResult = jsonParser.parse(tokenResultResponse.getData());
|
||||
|
||||
if (jTokenResult.isJsonObject()) {
|
||||
if(isDefaultAuthToken){
|
||||
if (isDefaultAuthToken) {
|
||||
setNewDefaultAuthData(constructAuthDataFromTokenResult(jTokenResult, authData), session);
|
||||
} else {
|
||||
setNewAuthData(constructAuthDataFromTokenResult(jTokenResult, authData), session);
|
||||
@ -702,7 +702,7 @@ public class HandlerUtil {
|
||||
|
||||
tokenEndpoint.setEntity(tokenEndpointPayload);
|
||||
String encodedClientApp = authData.getEncodedClientApp();
|
||||
if(encodedClientApp == null){
|
||||
if (encodedClientApp == null) {
|
||||
String clientId = authData.getClientId();
|
||||
String clientSecret = authData.getClientSecret();
|
||||
String toEncode = clientId + ":" + clientSecret;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user