Skip to content
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

Cursor based pagination for SCIM resources phase 1 #368

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BojithaPiyathilake
Copy link
Contributor

@BojithaPiyathilake BojithaPiyathilake commented May 3, 2022

Purpose

The purpose of this PR is to get the initial phase of cursor pagination for SCIM resource listings working with the Identity Server in JDBC and LDAP user stores.

Goals

  • User passes in the cursor or startIndex and the limit and the IS provides a (cursor or offset) paginated result.
  • Ability to travel forwards and backwards across pages using cursor pagination.
  • Cursor paginated functionality for both JDBC and LDAP user stores.

Related Issues

Related PRs

Test environment

  1. Java versions
  • JDK 1.8
  • Open JDK 11.0.15
  1. OS
  • Ubuntu 20.04
  1. IS:
  • WSO2IS-5.12.0-alpha14,
  1. User stores:
  • JDBC
    • DB2 - 11.5.7.0
    • Oracle - 19.3.0-ee
    • MSSQL - Microsoft SQL Server 2019 - 15.0.4223.1 (X64)
    • MySQL - Ver 8.0.29
    • Postgres - PostgreSQL 14.3
  • LDAP

@@ -1004,7 +1005,7 @@ public void testListWithPOST(String resourceString, List<Object> tempList)

abstractResourceManager.when(() -> AbstractResourceManager.getResourceEndpointURL(SCIMConstants.USER_ENDPOINT))
.thenReturn(SCIM2_USER_ENDPOINT + "/.search");
Mockito.when(userManager.listUsersWithPost(any(SearchRequest.class), anyMap())).thenReturn(tempList);
Mockito.when(userManager.listUsersWithPost(any(SearchRequest.class), anyMap())).thenReturn((UsersGetResponse) tempList);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recheck what is happening here.

Cursor pagination changes - phase 1

formatting adjustments before PR

more formatting adjustments and removing unneccesary comments

Formatting the code

Adjustments made to Cursor Pagination for SCIM resources

Changes made as per the code review

Changing the response type from a List to UsersGetResponse type object

Changing the response type from a List to UsersGetResponse type object - changes based on the code review

formatting changes

Made changes to support POST/.Search cursor pagination

Made changes so that the ServiceProviderConfig endpoint shows cursor pagination capability

minor changes

Fix for NullPointerException when running UserResourceManagerTest

Updated wording for serviceProviderConfigEndpoint changes

Formatting changes

Removing unused parameters from processPagination method

Updating tests broken due to changes and writing new tests for cursor pagination

formatting
@AnuradhaSK
Copy link
Contributor

Closing this PR for now as it's been open for more than 14 days. Will reopen and merge soon

@AnuradhaSK AnuradhaSK closed this Aug 29, 2022
@AnuradhaSK AnuradhaSK reopened this Jun 26, 2024
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants