harikrishna-patnala commented on code in PR #13033:
URL: https://github.com/apache/cloudstack/pull/13033#discussion_r3302110989
##########
plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/api/command/RegisterOAuthProviderCmd.java:
##########
@@ -56,6 +58,12 @@ public class RegisterOAuthProviderCmd extends BaseCmd {
@Parameter(name = ApiConstants.REDIRECT_URI, type = CommandType.STRING,
description = "Redirect URI pre-registered in the specific OAuth provider",
required = true)
private String redirectUri;
+ @Parameter(name = ApiConstants.AUTHORIZE_URL, type = CommandType.STRING,
description = "Authorize URL for OAuth initialization (only required for
keycloack provider)")
Review Comment:
If these are only required for keycloak provider, can we use the existing
details map, instead of these parameters ?
##########
plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/api/command/RegisterOAuthProviderCmd.java:
##########
@@ -98,10 +114,20 @@ public Map getDetails() {
@Override
public void execute() throws ServerApiException,
ConcurrentOperationException, EntityExistsException {
+ if (StringUtils.equals("keycloak", getProvider())) {
Review Comment:
is it possible to use some constants here ?
##########
plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/api/command/RegisterOAuthProviderCmd.java:
##########
@@ -56,6 +58,12 @@ public class RegisterOAuthProviderCmd extends BaseCmd {
@Parameter(name = ApiConstants.REDIRECT_URI, type = CommandType.STRING,
description = "Redirect URI pre-registered in the specific OAuth provider",
required = true)
private String redirectUri;
+ @Parameter(name = ApiConstants.AUTHORIZE_URL, type = CommandType.STRING,
description = "Authorize URL for OAuth initialization (only required for
keycloack provider)")
Review Comment:
if you think these can be used later for other providers, keep the
description accordingly.
--
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]