-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session Delete Improvements #135
base: session-api-temp
Are you sure you want to change the base?
Session Delete Improvements #135
Conversation
Isuru Samarasekara seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
/** | ||
* Validate whether the given filter is not empty and tenantDomain is valid. | ||
* | ||
* @param filter filter to be applied for session termination | ||
* @param tenantDomain tenant domain of the requester | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we fix the formatting errors here?
- Param descriptions are not aligned.
- Start sentences with uppercase letter and end with a
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected.
* @param filter filter to be applied for session termination | ||
* @param tenantDomain tenant domain of the requester | ||
*/ | ||
public static void validateFilter(String filter, String tenantDomain) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space before the method name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected
* @param filter the filter based on which the sessions to be terminated are selected (Mandatory) | ||
* @param limit maximum number of sessions to be selected (Optional) | ||
* @param since timestamp data value that points to the start of the range of data to be returned (Optional) | ||
* @param until timestamp data value that points to the end of the range of data to be returned (Optional) | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we fix formatting here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected
@@ -57,7 +57,10 @@ public enum ErrorMessage { | |||
"The provided userId is invalid."), | |||
ERROR_CODE_SERVER_ERROR(USER_MANAGEMENT_PREFIX.getPrefix() + "15001", | |||
"Unable to retrieve User.", | |||
"Server Encountered an error while retrieving the user."); | |||
"Server Encountered an error while retrieving the user."), | |||
INVALID_TENANT_DOMAIN(USER_MANAGEMENT_PREFIX.getPrefix() + "10002", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this is a server error. Shall we start the error code with 150xx
instead of 100xx
? We use 100xx
for client errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INVALID_TENANT_DOMAIN is a client error IMO... as the client could change the context tenantDomain to a non-existing one.
"Server Encountered an error while retrieving the user."), | ||
INVALID_TENANT_DOMAIN(USER_MANAGEMENT_PREFIX.getPrefix() + "10002", | ||
"Invalid tenant domain.", | ||
"Server Encountered an error while retrieving tenantId for tenantDomain."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add more context to this? Add the tenant domain at the end? WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implemented
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.QueryParam; | ||
import javax.ws.rs.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use * imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a auto generated file. So this should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected
@@ -36,8 +37,8 @@ | |||
import javax.ws.rs.core.Response; | |||
|
|||
import static org.wso2.carbon.identity.api.user.common.Constants.CORRELATION_ID_MDC; | |||
import static org.wso2.carbon.identity.api.user.common.Constants.ErrorMessage.ERROR_CODE_INVALID_USERNAME; | |||
import static org.wso2.carbon.identity.api.user.common.Constants.ErrorMessage.ERROR_CODE_SERVER_ERROR; | |||
import static org.wso2.carbon.identity.api.user.common.Constants.ErrorMessage.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shalll we avoid * imports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected
@isurusamarasekara can you address the comments? |
Purpose
Goals
Approach
Service Specification
Sessions API
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning