Module: Auth0::Api::V2::Grants
- Included in:
- Auth0::Api::V2
- Defined in:
- lib/auth0/api/v2/grants.rb
Instance Method Summary collapse
-
#delete_grant(id, user_id) ⇒ Object
Delete a grant associated with your account.
-
#grants(client_id: nil, user_id: nil, audience: nil, page: nil, per_page: nil, include_totals: nil) ⇒ json
(also: #get_all_grants)
Retrieve the grants associated with your account.
Instance Method Details
#delete_grant(id, user_id) ⇒ Object
Delete a grant associated with your account.
33 34 35 36 37 38 |
# File 'lib/auth0/api/v2/grants.rb', line 33 def delete_grant(id, user_id) raise Auth0::InvalidParameter, 'Must specify a grant id as id' if id.to_s.empty? raise Auth0::InvalidParameter, 'Must specify a user id' if user_id.to_s.empty? path = "#{grants_path}/#{id}" delete(path, user_id: user_id) end |
#grants(client_id: nil, user_id: nil, audience: nil, page: nil, per_page: nil, include_totals: nil) ⇒ json Also known as: get_all_grants
Retrieve the grants associated with your account.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/auth0/api/v2/grants.rb', line 16 def grants(client_id: nil, user_id: nil, audience: nil, page: nil, per_page: nil, include_totals: nil) request_params = { client_id: client_id, user_id: user_id, audience: audience, page: page, per_page: per_page, include_totals: include_totals } get(grants_path, request_params) end |