mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Update token api success response status code
This commit is contained in:
parent
5215eacf61
commit
5693977b01
@ -19,8 +19,6 @@
|
||||
package org.wso2.carbon.apimgt.keymgt.extension.api;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.wso2.carbon.apimgt.keymgt.extension.DCRResponse;
|
||||
import org.wso2.carbon.apimgt.keymgt.extension.TokenRequest;
|
||||
import org.wso2.carbon.apimgt.keymgt.extension.TokenResponse;
|
||||
@ -83,7 +81,7 @@ public class KeyManagerServiceImpl implements KeyManagerService {
|
||||
new TokenRequest(encodedClientCredentials.split(":")[0],
|
||||
encodedClientCredentials.split(":")[1], refreshToken, scope,
|
||||
grantType, assertion,admin_access_token));
|
||||
return Response.status(Response.Status.CREATED).entity(gson.toJson(resp)).build();
|
||||
return Response.status(Response.Status.OK).entity(gson.toJson(resp)).build();
|
||||
} catch (KeyMgtException e) {
|
||||
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();
|
||||
} catch (BadRequestException e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user