Skip to content

Commit 2f9001b

Browse files
committed
Refactor as per PR comments
1 parent dc30f14 commit 2f9001b

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

api/src/main/java/org/apache/cloudstack/auth/UserOAuth2Authenticator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ public interface UserOAuth2Authenticator extends Adapter {
4646

4747
/**
4848
* Verifies if the logged in user is valid for a specific domain
49-
* @return returns true if its valid user
49+
* @return true if it's a valid user, otherwise false
5050
*/
5151
boolean verifyUser(String email, String secretCode, Long domainId);
5252

5353
/**
54-
* Verifies the code provided by provider and fetches email for a specific domain
55-
* @return returns email
54+
* Verifies the secret code provided by provider and fetches email for a specific domain
55+
* @return email for the specified domain
5656
*/
5757
String verifyCodeAndFetchEmail(String secretCode, Long domainId);
5858

plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/OAuth2AuthManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface OAuth2AuthManager extends PluggableAPIAuthenticator, PluggableS
3434
Long GLOBAL_DOMAIN_ID = -1L;
3535

3636
public static ConfigKey<Boolean> OAuth2IsPluginEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class, "oauth2.enabled", "false",
37-
"Indicates whether OAuth plugin is enabled or not. Can be configured at domain level.", true, ConfigKey.Scope.Domain);
37+
"Indicates whether OAuth plugin is enabled or not. This can be configured at domain level.", true, ConfigKey.Scope.Domain);
3838
public static final ConfigKey<String> OAuth2Plugins = new ConfigKey<String>("Advanced", String.class, "oauth2.plugins", "google,github",
3939
"List of OAuth plugins", true);
4040
public static final ConfigKey<String> OAuth2PluginsExclude = new ConfigKey<String>("Advanced", String.class, "oauth2.plugins.exclude", "",

plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/api/command/ListOAuthProvidersCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ public class ListOAuthProvidersCmd extends BaseListCmd implements APIAuthenticat
6464
private String provider;
6565

6666
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class,
67-
description = "List OAuth providers for a specific domain. Use -1 for global providers only.")
67+
description = "List OAuth providers for a specific domain. Use -1 for global providers only.", since = "4.23.0")
6868
private Long domainId;
6969

7070
@Parameter(name = ApiConstants.DOMAIN, type = CommandType.STRING,
71-
description = "Domain path for domain-specific OAuth provider lookup")
71+
description = "Domain path for domain-specific OAuth provider lookup", since = "4.23.0")
7272
private String domainPath;
7373

7474
/////////////////////////////////////////////////////

plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/api/command/RegisterOAuthProviderCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class RegisterOAuthProviderCmd extends BaseCmd {
6060
private String redirectUri;
6161

6262
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class,
63-
description = "Domain ID for domain-specific OAuth provider. If not provided, registers as global provider")
63+
description = "Domain ID for domain-specific OAuth provider. If not provided, registers as global provider", since = "4.23.0")
6464
private Long domainId;
6565

6666
@Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP,

plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/api/command/VerifyOAuthCodeAndGetUserCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ public class VerifyOAuthCodeAndGetUserCmd extends BaseListCmd implements APIAuth
6060
private String secretCode;
6161

6262
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class,
63-
description = "Domain ID for domain-specific OAuth provider lookup")
63+
description = "Domain ID for domain-specific OAuth provider lookup", since = "4.23.0")
6464
private Long domainId;
6565

6666
@Parameter(name = ApiConstants.DOMAIN, type = CommandType.STRING,
67-
description = "Domain path for domain-specific OAuth provider lookup")
67+
description = "Domain path for domain-specific OAuth provider lookup", since = "4.23.0")
6868
private String domainPath;
6969

7070
/////////////////////////////////////////////////////

plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/api/response/OauthProviderResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ public class OauthProviderResponse extends BaseResponse {
5858
private String redirectUri;
5959

6060
@SerializedName(ApiConstants.DOMAIN_ID)
61-
@Param(description = "UUID of the domain the provider belongs to (empty for global)")
61+
@Param(description = "UUID of the domain the provider belongs to (empty for global)", since = "4.23.0")
6262
private String domainUuid;
6363

6464
@SerializedName(ApiConstants.DOMAIN)
65-
@Param(description = "name of the domain the provider belongs to (empty for global)")
65+
@Param(description = "name of the domain the provider belongs to (empty for global)", since = "4.23.0")
6666
private String domainName;
6767

6868
@SerializedName(ApiConstants.ENABLED)

0 commit comments

Comments
 (0)