Class UserGrantApi

java.lang.Object
com.okta.sdk.resource.api.UserGrantApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-09-23T08:35:59.300824-05:00[America/Chicago]", comments="Generator version: 7.8.0") public class UserGrantApi extends Object
  • Constructor Details

    • UserGrantApi

      public UserGrantApi()
    • UserGrantApi

      public UserGrantApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getUserGrant

      public OAuth2ScopeConsentGrant getUserGrant(String userId, String grantId, String expand) throws ApiException
      Retrieve a User Grant Retrieves a Grant for the specified User
      Parameters:
      userId - ID of an existing Okta user (required)
      grantId - Grant ID (required)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      Returns:
      OAuth2ScopeConsentGrant
      Throws:
      ApiException - if fails to make API call
    • getUserGrant

      public OAuth2ScopeConsentGrant getUserGrant(String userId, String grantId, String expand, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a User Grant Retrieves a Grant for the specified User
      Parameters:
      userId - ID of an existing Okta user (required)
      grantId - Grant ID (required)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      OAuth2ScopeConsentGrant
      Throws:
      ApiException - if fails to make API call
    • listGrantsForUserAndClient

      public List<OAuth2ScopeConsentGrant> listGrantsForUserAndClient(String userId, String clientId, String expand, String after, Integer limit) throws ApiException
      List all Grants for a Client Lists all Grants for a specified User and client
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      after - The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - Specifies the number of tokens to return (optional, default to 20)
      Returns:
      List<OAuth2ScopeConsentGrant>
      Throws:
      ApiException - if fails to make API call
    • listGrantsForUserAndClient

      public List<OAuth2ScopeConsentGrant> listGrantsForUserAndClient(String userId, String clientId, String expand, String after, Integer limit, Map<String,String> additionalHeaders) throws ApiException
      List all Grants for a Client Lists all Grants for a specified User and client
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      after - The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - Specifies the number of tokens to return (optional, default to 20)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<OAuth2ScopeConsentGrant>
      Throws:
      ApiException - if fails to make API call
    • listUserGrants

      public List<OAuth2ScopeConsentGrant> listUserGrants(String userId, String scopeId, String expand, String after, Integer limit) throws ApiException
      List all User Grants Lists all Grants for the specified user
      Parameters:
      userId - ID of an existing Okta user (required)
      scopeId - The scope ID to filter on (optional)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      after - The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - Specifies the number of grants to return (optional, default to 20)
      Returns:
      List<OAuth2ScopeConsentGrant>
      Throws:
      ApiException - if fails to make API call
    • listUserGrants

      public List<OAuth2ScopeConsentGrant> listUserGrants(String userId, String scopeId, String expand, String after, Integer limit, Map<String,String> additionalHeaders) throws ApiException
      List all User Grants Lists all Grants for the specified user
      Parameters:
      userId - ID of an existing Okta user (required)
      scopeId - The scope ID to filter on (optional)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      after - The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - Specifies the number of grants to return (optional, default to 20)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<OAuth2ScopeConsentGrant>
      Throws:
      ApiException - if fails to make API call
    • revokeGrantsForUserAndClient

      public void revokeGrantsForUserAndClient(String userId, String clientId) throws ApiException
      Revoke all Grants for a Client Revokes all Grants for the specified User and client
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      Throws:
      ApiException - if fails to make API call
    • revokeGrantsForUserAndClient

      public void revokeGrantsForUserAndClient(String userId, String clientId, Map<String,String> additionalHeaders) throws ApiException
      Revoke all Grants for a Client Revokes all Grants for the specified User and client
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • revokeUserGrant

      public void revokeUserGrant(String userId, String grantId) throws ApiException
      Revoke a User Grant Revokes one Grant for a specified User
      Parameters:
      userId - ID of an existing Okta user (required)
      grantId - Grant ID (required)
      Throws:
      ApiException - if fails to make API call
    • revokeUserGrant

      public void revokeUserGrant(String userId, String grantId, Map<String,String> additionalHeaders) throws ApiException
      Revoke a User Grant Revokes one Grant for a specified User
      Parameters:
      userId - ID of an existing Okta user (required)
      grantId - Grant ID (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • revokeUserGrants

      public void revokeUserGrants(String userId) throws ApiException
      Revoke all User Grants Revokes all Grants for a specified User
      Parameters:
      userId - ID of an existing Okta user (required)
      Throws:
      ApiException - if fails to make API call
    • revokeUserGrants

      public void revokeUserGrants(String userId, Map<String,String> additionalHeaders) throws ApiException
      Revoke all User Grants Revokes all Grants for a specified User
      Parameters:
      userId - ID of an existing Okta user (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()