-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK-4542] Support organization in client credentials
- Loading branch information
1 parent
b31f779
commit 31ca7c8
Showing
20 changed files
with
934 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
src/main/java/com/auth0/client/mgmt/filter/OrganizationClientGrantsFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.auth0.client.mgmt.filter; | ||
|
||
/** | ||
* Class used to filter the results received when listing the client grants associated with an organization. | ||
* Related to the {@link com.auth0.client.mgmt.OrganizationsEntity} entity. | ||
*/ | ||
public class OrganizationClientGrantsFilter extends BaseFilter { | ||
|
||
/** | ||
* Filter by client id | ||
* | ||
* @param clientId only retrieve items with this client id. | ||
* @return this filter instance | ||
*/ | ||
public OrganizationClientGrantsFilter withClientId(String clientId) { | ||
parameters.put("client_id", clientId); | ||
return this; | ||
} | ||
|
||
/** | ||
* Filter by audience | ||
* | ||
* @param audience only retrieve the item with this audience. | ||
* @return this filter instance | ||
*/ | ||
public OrganizationClientGrantsFilter withAudience(String audience) { | ||
parameters.put("audience", audience); | ||
return this; | ||
} | ||
|
||
/** | ||
* Filter by page | ||
* | ||
* @param pageNumber the page number to retrieve. | ||
* @param amountPerPage the amount of items per page to retrieve. | ||
* @return this filter instance | ||
*/ | ||
public OrganizationClientGrantsFilter withPage(int pageNumber, int amountPerPage) { | ||
parameters.put("page", pageNumber); | ||
parameters.put("per_page", amountPerPage); | ||
return this; | ||
} | ||
|
||
/** | ||
* Include the query summary | ||
* | ||
* @param includeTotals whether to include or not the query summary. | ||
* @return this filter instance | ||
*/ | ||
public OrganizationClientGrantsFilter withTotals(boolean includeTotals) { | ||
parameters.put("include_totals", includeTotals); | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.