Package com.auth0.client.mgmt
Class ClientGrantsEntity
java.lang.Object
com.auth0.client.mgmt.ClientGrantsEntity
Class that provides an implementation of the Client Grants methods of the Management API as defined in https://auth0.com/docs/api/management/v2#!/Client_Grants
This class is not thread-safe.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final okhttp3.HttpUrlprotected final Auth0HttpClientprotected final TokenProvider -
Method Summary
Modifier and TypeMethodDescriptionCreate a Client Grant.Create a Client Grant.Delete an existing Client Grant.list(ClientGrantsFilter filter) Request all the Client Grants.listOrganizations(String clientGrantId, PageFilter filter) Returns the organizations associated with this client grant.protected <T> Request<T>request(HttpMethod method, com.fasterxml.jackson.core.type.TypeReference<T> target, Consumer<com.auth0.client.mgmt.RequestBuilder<T>> customizer) Update an existing Client Grant.Update an existing Client Grant.voidRequest(HttpMethod method, Consumer<com.auth0.client.mgmt.RequestBuilder<Void>> customizer)
-
Field Details
-
client
-
baseUrl
protected final okhttp3.HttpUrl baseUrl -
tokenProvider
-
-
Method Details
-
list
Request all the Client Grants. A token with scope read:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/get_client_grants- Parameters:
filter- the filter to use. Can be null- Returns:
- a Request to execute.
-
create
Create a Client Grant. A token with scope create:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/post_client_grants- Parameters:
clientId- the application's client id to associate this grant with.audience- the audience of the grant.scope- the scope to grant.- Returns:
- a Request to execute.
-
create
public Request<ClientGrant> create(String clientId, String audience, String[] scope, String orgUsage, Boolean allowAnyOrg) Create a Client Grant. A token with scope create:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/post_client_grants- Parameters:
clientId- the application's client id to associate this grant with.audience- the audience of the grant.scope- the scope to grant.orgUsage- Defines whether organizations can be used with client credentials exchanges for this grant. (defaults to deny when not defined)allowAnyOrg- If true, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.- Returns:
- a Request to execute.
-
delete
Delete an existing Client Grant. A token with scope delete:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/delete_client_grants_by_id- Parameters:
clientGrantId- the client grant id.- Returns:
- a Request to execute.
-
update
Update an existing Client Grant. A token with scope update:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/patch_client_grants_by_id- Parameters:
clientGrantId- the client grant id.scope- the scope to grant.- Returns:
- a Request to execute.
-
update
public Request<ClientGrant> update(String clientGrantId, String[] scope, String orgUsage, Boolean allowAnyOrg) Update an existing Client Grant. A token with scope update:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/patch_client_grants_by_id- Parameters:
clientGrantId- the client grant id.scope- the scope to grant.orgUsage- Defines whether organizations can be used with client credentials exchanges for this grant. (defaults to deny when not defined)allowAnyOrg- If true, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.- Returns:
- a Request to execute.
-
listOrganizations
Returns the organizations associated with this client grant. A token with scoperead:organization_client_grantsis required.- Parameters:
clientGrantId- the client grant ID.filter- an optional filter to limit results.- Returns:
- a request to execute.
-
voidRequest
protected Request<Void> voidRequest(HttpMethod method, Consumer<com.auth0.client.mgmt.RequestBuilder<Void>> customizer) -
request
protected <T> Request<T> request(HttpMethod method, com.fasterxml.jackson.core.type.TypeReference<T> target, Consumer<com.auth0.client.mgmt.RequestBuilder<T>> customizer)
-