use of io.jans.as.model.authorize.DeviceAuthorizationResponseParam.VERIFICATION_URI in project jans by JanssenProject.
the class DeviceAuthorizationRestWebServiceImpl method getResponseJSONObject.
private JSONObject getResponseJSONObject(DeviceAuthorizationCacheControl deviceAuthorizationCacheControl) throws JSONException {
URI verificationUriComplete = UriBuilder.fromUri(deviceAuthorizationCacheControl.getVerificationUri()).queryParam(DeviceAuthorizationResponseParam.USER_CODE, deviceAuthorizationCacheControl.getUserCode()).build();
JSONObject responseJsonObject = new JSONObject();
responseJsonObject.put(DEVICE_CODE, deviceAuthorizationCacheControl.getDeviceCode());
responseJsonObject.put(USER_CODE, deviceAuthorizationCacheControl.getUserCode());
responseJsonObject.put(VERIFICATION_URI, deviceAuthorizationCacheControl.getVerificationUri());
responseJsonObject.put(VERIFICATION_URI_COMPLETE, verificationUriComplete.toString());
responseJsonObject.put(EXPIRES_IN, deviceAuthorizationCacheControl.getExpiresIn());
responseJsonObject.put(INTERVAL, deviceAuthorizationCacheControl.getInterval());
return responseJsonObject;
}
Aggregations