Hi All, Currently, in APIM, we are using our own keyValidation method instead of identity.oauth keyValidation method. I'm checking the possibility of doing $subject.. But it seems some of the data fields required for APIM, does not return from the IS keyvalidation method.
Following is the difference between the data availability of two DTOs return by each method.. (The data fields marked in red colour are missing, if we used IS keyvalidation method). In the gateway authentication handler we take this keyValidationInfoDTO object and set it's info into AuthenticationContext object. Later we use these data, in several places like; doRoleBasedAccessThrottling, UsageHandler #handleRequest etc.. so, currently we could not use the same keyvalidation method provide by IS as it is.. And not sure whether we could extend the IS keyvalidation method to support required for us since they does not contain the data like subscriber details. @IS team: could you provide any input on this ? *APIM* keyValidationInfoDTO.setAuthorized(true); keyValidationInfoDTO.setTier(tier); keyValidationInfoDTO.setType(type); keyValidationInfoDTO.setSubscriber(subscriberName); keyValidationInfoDTO.setIssuedTime(issuedTime); keyValidationInfoDTO.setAuthorizedDomains (ApiMgtDAO.getAuthorizedDomainList(accessToken)); keyValidationInfoDTO.setValidityPeriod(validityPeriod); keyValidationInfoDTO.setUserType(userType); keyValidationInfoDTO.setEndUserName(endUserName); keyValidationInfoDTO.setApplicationId(applicationId); keyValidationInfoDTO.setApplicationName(applicationName); keyValidationInfoDTO.setApplicationTier(applicationTier); keyValidationInfoDTO.setApiName(apiName); keyValidationInfoDTO.setConsumerKey(APIUtil.decryptToken(consumerKey)); keyValidationInfoDTO.setApiPublisher(apiPublisher); *IS* tokenRespDTO.setValid(true); tokenRespDTO.setConsumerKey(accessTokenDO.getConsumerKey()); tokenRespDTO.setAuthorizedUser(accessTokenDO.getAuthzUser()); tokenRespDTO.setExpiryTime(validityPeriodInMillis / 1000); tokenRespDTO.setScope(accessTokenDO.getScope()); Regards, Dinusha. -- Dinusha Dilrukshi Senior Software Engineer WSO2 Inc.: http://wso2.com/ Mobile: +94725255071 Blog: http://dinushasblog.blogspot.com/
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev