Damans227 commented on code in PR #12702:
URL: https://github.com/apache/cloudstack/pull/12702#discussion_r3001972344


##########
plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/OAuth2AuthManagerImpl.java:
##########
@@ -219,6 +236,38 @@ public boolean deleteOauthProvider(Long id) {
         return _oauthProviderDao.remove(id);
     }
 
+    @Override
+    public Long resolveDomainId(Map<String, Object[]> params) {
+        final String[] domainIdArray = 
(String[])params.get(ApiConstants.DOMAIN_ID);

Review Comment:
   
[`getDomainIdFromParams`](https://github.com/Damans227/cloudstack/blob/2f9001bf2879727d2c829155fa50534b9c1184bd/plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/api/command/OauthLoginAPIAuthenticatorCmd.java#L196)
 in `OauthLoginAPIAuthenticatorCmd` also looks up `ApiConstants.DOMAIN_ID` 
(`"domainid"`), same as 
[`resolveDomainId`](https://github.com/Damans227/cloudstack/blob/2f9001bf2879727d2c829155fa50534b9c1184bd/plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/OAuth2AuthManagerImpl.java#L239).
 This works because CloudStack's API servlet normalizes parameter names to 
lowercase before they reach the params map, so `DOMAIN__ID` (`"domainId"`) 
declared on the field becomes `"domainid"` in the map. Both methods are 
consistent in this regard.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to