clients/hydra/ruby/lib/ory-hydra-client/api/admin_api.rb
# Reject a Consent Request
# When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf.  The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\&quot;Application my-dropbox-app wants write access to all your private files\&quot;).  The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.  This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted.  The response contains a redirect URL which the consent provider should redirect the user-agent to.
# @param consent_challenge [String] 
# @param [Hash] opts the optional parameters
# @option opts [RejectRequest] :body 
# @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers
Reject a Consent Request
When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.  The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\").  The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.  This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted.  The response contains a redirect URL which the consent provider should redirect the user-agent to.
Reject a Consent Request When an authorization code hybrid or implicit OAuth 2 . 0 Flow is initiated ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it . If the subject authenticated he / she must now be asked if the OAuth 2 . 0 Client which initiated the flow should be allowed to access the resources on the subject ' s behalf . The consent provider which handles this request and is a web app implemented and hosted by you . It shows a subject interface which asks the subject to grant or deny the client access to the requested scope ( \ " Application my - dropbox - app wants write access to all your private files \ " ) . The consent challenge is appended to the consent provider ' s URL to which the subject ' s user - agent ( browser ) is redirected to . The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request . This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2 . 0 client to access resources on his / her behalf . The consent provider must include a reason why the consent was not granted . The response contains a redirect URL which the consent provider should redirect the user - agent to .
def reject_consent_request_with_http_info(consent_challenge, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: AdminApi.reject_consent_request ...'
      end
      if @api_client.config.client_side_validation && consent_challenge.nil?
        fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling AdminApi.reject_consent_request"
      end
      local_var_path = '/oauth2/auth/requests/consent/reject'
      query_params = opts[:query_params] || {}
      query_params[:'consent_challenge'] = consent_challenge
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
      return_type = opts[:debug_return_type] || 'CompletedRequest'
      auth_names = opts[:debug_auth_names] || []
      new_options = opts.merge(
        :operation => :"AdminApi.reject_consent_request",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: AdminApi#reject_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def reject_consent_request_with_http_info ( consent_challenge , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: AdminApi.reject_consent_request ...' end if @api_client . config . client_side_validation && consent_challenge . nil? fail ArgumentError , "Missing the required parameter 'consent_challenge' when calling AdminApi.reject_consent_request" end local_var_path = '/oauth2/auth/requests/consent/reject' query_params = opts [ :query_params ] || { } query_params [ :' consent_challenge ' ] = consent_challenge header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( opts [ :' body ' ] ) return_type = opts [ :debug_return_type ] || 'CompletedRequest' auth_names = opts [ :debug_auth_names ] || [ ] new_options = opts . merge ( :operation => :" AdminApi.reject_consent_request " , :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :PUT , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: AdminApi#reject_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Reject a Consent Request
When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it.
Reject a Consent Request When an authorization code hybrid or implicit OAuth 2 . 0 Flow is initiated ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it .
# verify the required parameter 'consent_challenge' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
CompletedRequest data, response status code and response headers
CompletedRequest data response status code and response headers
Array<(CompletedRequest, Integer, Hash)>
consent_challenge
<not_specific>
opts
None
<not_specific>
None
<not_specific>
opts the optional parameters
opts the optional parameters