class OryHydraClient::AdminApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/ory-hydra-client/api/admin_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

accept_login_request(login_challenge, opts = {}) click to toggle source

Accept a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate ("show the subject a login screen") a subject (in OAuth2 the proper name for subject is "resource owner"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. @param login_challenge [String] @param [Hash] opts the optional parameters @option opts [AcceptLoginRequest] :body @return [CompletedRequest]

# File lib/ory-hydra-client/api/admin_api.rb, line 96
def accept_login_request(login_challenge, opts = {})
  data, _status_code, _headers = accept_login_request_with_http_info(login_challenge, opts)
  data
end
accept_login_request_with_http_info(login_challenge, opts = {}) click to toggle source

Accept a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate ("show the subject a login screen&quot;) a subject (in OAuth2 the proper name for subject is "resource owner&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject&#39;s ID and if ORY Hydra should remember the subject&#39;s subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. @param login_challenge [String] @param [Hash] opts the optional parameters @option opts [AcceptLoginRequest] :body @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 107
def accept_login_request_with_http_info(login_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.accept_login_request ...'
  end
  # verify the required parameter 'login_challenge' is set
  if @api_client.config.client_side_validation && login_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'login_challenge' when calling AdminApi.accept_login_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/login/accept'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'login_challenge'] = login_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])

  # return_type
  return_type = opts[:debug_return_type] || 'CompletedRequest'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.accept_login_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#accept_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
accept_logout_request(logout_challenge, opts = {}) click to toggle source

Accept a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. @param logout_challenge [String] @param [Hash] opts the optional parameters @return [CompletedRequest]

# File lib/ory-hydra-client/api/admin_api.rb, line 163
def accept_logout_request(logout_challenge, opts = {})
  data, _status_code, _headers = accept_logout_request_with_http_info(logout_challenge, opts)
  data
end
accept_logout_request_with_http_info(logout_challenge, opts = {}) click to toggle source

Accept a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. @param logout_challenge [String] @param [Hash] opts the optional parameters @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 173
def accept_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.accept_logout_request ...'
  end
  # verify the required parameter 'logout_challenge' is set
  if @api_client.config.client_side_validation && logout_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling AdminApi.accept_logout_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/logout/accept'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'logout_challenge'] = logout_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CompletedRequest'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.accept_logout_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#accept_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_json_web_key_set(set, opts = {}) click to toggle source

Generate a New JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param set [String] The set @param [Hash] opts the optional parameters @option opts [JsonWebKeySetGeneratorRequest] :body @return [JSONWebKeySet]

# File lib/ory-hydra-client/api/admin_api.rb, line 228
def create_json_web_key_set(set, opts = {})
  data, _status_code, _headers = create_json_web_key_set_with_http_info(set, opts)
  data
end
create_json_web_key_set_with_http_info(set, opts = {}) click to toggle source

Generate a New JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param set [String] The set @param [Hash] opts the optional parameters @option opts [JsonWebKeySetGeneratorRequest] :body @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 239
def create_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.create_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.create_json_web_key_set"
  end
  # resource path
  local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])

  # return_type
  return_type = opts[:debug_return_type] || 'JSONWebKeySet'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.create_json_web_key_set",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#create_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_o_auth2_client(body, opts = {}) click to toggle source

Create an OAuth 2.0 Client Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The secret will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somwhere safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. @param body [OAuth2Client] @param [Hash] opts the optional parameters @return [OAuth2Client]

# File lib/ory-hydra-client/api/admin_api.rb, line 294
def create_o_auth2_client(body, opts = {})
  data, _status_code, _headers = create_o_auth2_client_with_http_info(body, opts)
  data
end
create_o_auth2_client_with_http_info(body, opts = {}) click to toggle source

Create an OAuth 2.0 Client Create a new OAuth 2.0 client If you pass &#x60;client_secret&#x60; the secret will be used, otherwise a random secret will be generated. The secret will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somwhere safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. @param body [OAuth2Client] @param [Hash] opts the optional parameters @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 304
def create_o_auth2_client_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.create_o_auth2_client ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.create_o_auth2_client"
  end
  # resource path
  local_var_path = '/clients'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2Client'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.create_o_auth2_client",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#create_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_json_web_key(kid, set, opts = {}) click to toggle source

Delete a JSON Web Key Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param kid [String] The kid of the desired key @param set [String] The set @param [Hash] opts the optional parameters @return [nil]

# File lib/ory-hydra-client/api/admin_api.rb, line 360
def delete_json_web_key(kid, set, opts = {})
  delete_json_web_key_with_http_info(kid, set, opts)
  nil
end
delete_json_web_key_set(set, opts = {}) click to toggle source

Delete a JSON Web Key Set Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param set [String] The set @param [Hash] opts the optional parameters @return [nil]

# File lib/ory-hydra-client/api/admin_api.rb, line 428
def delete_json_web_key_set(set, opts = {})
  delete_json_web_key_set_with_http_info(set, opts)
  nil
end
delete_json_web_key_set_with_http_info(set, opts = {}) click to toggle source

Delete a JSON Web Key Set Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param set [String] The set @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 438
def delete_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.delete_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.delete_json_web_key_set"
  end
  # resource path
  local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.delete_json_web_key_set",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#delete_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_json_web_key_with_http_info(kid, set, opts = {}) click to toggle source

Delete a JSON Web Key Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param kid [String] The kid of the desired key @param set [String] The set @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 371
def delete_json_web_key_with_http_info(kid, set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.delete_json_web_key ...'
  end
  # verify the required parameter 'kid' is set
  if @api_client.config.client_side_validation && kid.nil?
    fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.delete_json_web_key"
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.delete_json_web_key"
  end
  # resource path
  local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.delete_json_web_key",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#delete_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_o_auth2_client(id, opts = {}) click to toggle source

Deletes an OAuth 2.0 Client Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. @param id [String] The id of the OAuth 2.0 Client. @param [Hash] opts the optional parameters @return [nil]

# File lib/ory-hydra-client/api/admin_api.rb, line 491
def delete_o_auth2_client(id, opts = {})
  delete_o_auth2_client_with_http_info(id, opts)
  nil
end
delete_o_auth2_client_with_http_info(id, opts = {}) click to toggle source

Deletes an OAuth 2.0 Client Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. @param id [String] The id of the OAuth 2.0 Client. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 501
def delete_o_auth2_client_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.delete_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.delete_o_auth2_client"
  end
  # resource path
  local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.delete_o_auth2_client",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#delete_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_o_auth2_token(client_id, opts = {}) click to toggle source

Delete OAuth2 Access Tokens from a Client This endpoint deletes OAuth2 access tokens issued for a client from the database @param client_id [String] @param [Hash] opts the optional parameters @return [nil]

# File lib/ory-hydra-client/api/admin_api.rb, line 554
def delete_o_auth2_token(client_id, opts = {})
  delete_o_auth2_token_with_http_info(client_id, opts)
  nil
end
delete_o_auth2_token_with_http_info(client_id, opts = {}) click to toggle source

Delete OAuth2 Access Tokens from a Client This endpoint deletes OAuth2 access tokens issued for a client from the database @param client_id [String] @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 564
def delete_o_auth2_token_with_http_info(client_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.delete_o_auth2_token ...'
  end
  # verify the required parameter 'client_id' is set
  if @api_client.config.client_side_validation && client_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_id' when calling AdminApi.delete_o_auth2_token"
  end
  # resource path
  local_var_path = '/oauth2/tokens'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'client_id'] = client_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.delete_o_auth2_token",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#delete_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
flush_inactive_o_auth2_tokens(opts = {}) click to toggle source

Flush Expired OAuth2 Access Tokens This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. @param [Hash] opts the optional parameters @option opts [FlushInactiveOAuth2TokensRequest] :body @return [nil]

# File lib/ory-hydra-client/api/admin_api.rb, line 618
def flush_inactive_o_auth2_tokens(opts = {})
  flush_inactive_o_auth2_tokens_with_http_info(opts)
  nil
end
flush_inactive_o_auth2_tokens_with_http_info(opts = {}) click to toggle source

Flush Expired OAuth2 Access Tokens This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. @param [Hash] opts the optional parameters @option opts [FlushInactiveOAuth2TokensRequest] :body @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 628
def flush_inactive_o_auth2_tokens_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.flush_inactive_o_auth2_tokens ...'
  end
  # resource path
  local_var_path = '/oauth2/flush'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.flush_inactive_o_auth2_tokens",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#flush_inactive_o_auth2_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_json_web_key(kid, set, opts = {}) click to toggle source

Fetch a JSON Web Key This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). @param kid [String] The kid of the desired key @param set [String] The set @param [Hash] opts the optional parameters @return [JSONWebKeySet]

# File lib/ory-hydra-client/api/admin_api.rb, line 744
def get_json_web_key(kid, set, opts = {})
  data, _status_code, _headers = get_json_web_key_with_http_info(kid, set, opts)
  data
end
get_json_web_key_set(set, opts = {}) click to toggle source

Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param set [String] The set @param [Hash] opts the optional parameters @return [JSONWebKeySet]

# File lib/ory-hydra-client/api/admin_api.rb, line 812
def get_json_web_key_set(set, opts = {})
  data, _status_code, _headers = get_json_web_key_set_with_http_info(set, opts)
  data
end
get_json_web_key_set_with_http_info(set, opts = {}) click to toggle source

Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param set [String] The set @param [Hash] opts the optional parameters @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 822
def get_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.get_json_web_key_set"
  end
  # resource path
  local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'JSONWebKeySet'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.get_json_web_key_set",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#get_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_json_web_key_with_http_info(kid, set, opts = {}) click to toggle source

Fetch a JSON Web Key This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). @param kid [String] The kid of the desired key @param set [String] The set @param [Hash] opts the optional parameters @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 755
def get_json_web_key_with_http_info(kid, set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_json_web_key ...'
  end
  # verify the required parameter 'kid' is set
  if @api_client.config.client_side_validation && kid.nil?
    fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.get_json_web_key"
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.get_json_web_key"
  end
  # resource path
  local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'JSONWebKeySet'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.get_json_web_key",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#get_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_login_request(login_challenge, opts = {}) click to toggle source

Get a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate ("show the subject a login screen") a subject (in OAuth2 the proper name for subject is "resource owner"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. @param login_challenge [String] @param [Hash] opts the optional parameters @return [LoginRequest]

# File lib/ory-hydra-client/api/admin_api.rb, line 875
def get_login_request(login_challenge, opts = {})
  data, _status_code, _headers = get_login_request_with_http_info(login_challenge, opts)
  data
end
get_login_request_with_http_info(login_challenge, opts = {}) click to toggle source

Get a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate ("show the subject a login screen&quot;) a subject (in OAuth2 the proper name for subject is "resource owner&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. @param login_challenge [String] @param [Hash] opts the optional parameters @return [Array<(LoginRequest, Integer, Hash)>] LoginRequest data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 885
def get_login_request_with_http_info(login_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_login_request ...'
  end
  # verify the required parameter 'login_challenge' is set
  if @api_client.config.client_side_validation && login_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'login_challenge' when calling AdminApi.get_login_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/login'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'login_challenge'] = login_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LoginRequest'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.get_login_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#get_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_logout_request(logout_challenge, opts = {}) click to toggle source

Get a Logout Request Use this endpoint to fetch a logout request. @param logout_challenge [String] @param [Hash] opts the optional parameters @return [LogoutRequest]

# File lib/ory-hydra-client/api/admin_api.rb, line 939
def get_logout_request(logout_challenge, opts = {})
  data, _status_code, _headers = get_logout_request_with_http_info(logout_challenge, opts)
  data
end
get_logout_request_with_http_info(logout_challenge, opts = {}) click to toggle source

Get a Logout Request Use this endpoint to fetch a logout request. @param logout_challenge [String] @param [Hash] opts the optional parameters @return [Array<(LogoutRequest, Integer, Hash)>] LogoutRequest data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 949
def get_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_logout_request ...'
  end
  # verify the required parameter 'logout_challenge' is set
  if @api_client.config.client_side_validation && logout_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling AdminApi.get_logout_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/logout'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'logout_challenge'] = logout_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LogoutRequest'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.get_logout_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#get_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_o_auth2_client(id, opts = {}) click to toggle source

Get an OAuth 2.0 Client. Get an OAUth 2.0 client by its ID. This endpoint never returns passwords. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. @param id [String] The id of the OAuth 2.0 Client. @param [Hash] opts the optional parameters @return [OAuth2Client]

# File lib/ory-hydra-client/api/admin_api.rb, line 1003
def get_o_auth2_client(id, opts = {})
  data, _status_code, _headers = get_o_auth2_client_with_http_info(id, opts)
  data
end
get_o_auth2_client_with_http_info(id, opts = {}) click to toggle source

Get an OAuth 2.0 Client. Get an OAUth 2.0 client by its ID. This endpoint never returns passwords. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. @param id [String] The id of the OAuth 2.0 Client. @param [Hash] opts the optional parameters @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1013
def get_o_auth2_client_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.get_o_auth2_client"
  end
  # resource path
  local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2Client'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.get_o_auth2_client",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#get_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_version(opts = {}) click to toggle source

Get Service Version This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. @param [Hash] opts the optional parameters @return [Version]

# File lib/ory-hydra-client/api/admin_api.rb, line 1065
def get_version(opts = {})
  data, _status_code, _headers = get_version_with_http_info(opts)
  data
end
get_version_with_http_info(opts = {}) click to toggle source

Get Service Version This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set. @param [Hash] opts the optional parameters @return [Array<(Version, Integer, Hash)>] Version data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1074
def get_version_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_version ...'
  end
  # resource path
  local_var_path = '/version'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Version'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.get_version",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#get_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
introspect_o_auth2_token(token, opts = {}) click to toggle source

Introspect OAuth2 Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `accessTokenExtra` during the consent flow. For more information [read this blog post](www.oauth.com/oauth2-servers/token-introspection-endpoint/). @param token [String] The string value of the token. For access tokens, this is the \&quot;access_token\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \&quot;refresh_token\&quot; value returned. @param [Hash] opts the optional parameters @option opts [String] :scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. @return [OAuth2TokenIntrospection]

# File lib/ory-hydra-client/api/admin_api.rb, line 1124
def introspect_o_auth2_token(token, opts = {})
  data, _status_code, _headers = introspect_o_auth2_token_with_http_info(token, opts)
  data
end
introspect_o_auth2_token_with_http_info(token, opts = {}) click to toggle source

Introspect OAuth2 Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow. For more information [read this blog post](www.oauth.com/oauth2-servers/token-introspection-endpoint/). @param token [String] The string value of the token. For access tokens, this is the \&quot;access_token\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \&quot;refresh_token\&quot; value returned. @param [Hash] opts the optional parameters @option opts [String] :scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. @return [Array<(OAuth2TokenIntrospection, Integer, Hash)>] OAuth2TokenIntrospection data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1135
def introspect_o_auth2_token_with_http_info(token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.introspect_o_auth2_token ...'
  end
  # verify the required parameter 'token' is set
  if @api_client.config.client_side_validation && token.nil?
    fail ArgumentError, "Missing the required parameter 'token' when calling AdminApi.introspect_o_auth2_token"
  end
  # resource path
  local_var_path = '/oauth2/introspect'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['token'] = token
  form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2TokenIntrospection'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.introspect_o_auth2_token",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#introspect_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
is_instance_alive(opts = {}) click to toggle source

Check Alive Status This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. @param [Hash] opts the optional parameters @return [HealthStatus]

# File lib/ory-hydra-client/api/admin_api.rb, line 1191
def is_instance_alive(opts = {})
  data, _status_code, _headers = is_instance_alive_with_http_info(opts)
  data
end
is_instance_alive_with_http_info(opts = {}) click to toggle source

Check Alive Status This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. @param [Hash] opts the optional parameters @return [Array<(HealthStatus, Integer, Hash)>] HealthStatus data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1200
def is_instance_alive_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.is_instance_alive ...'
  end
  # resource path
  local_var_path = '/health/alive'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'HealthStatus'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.is_instance_alive",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#is_instance_alive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_o_auth2_clients(opts = {}) click to toggle source

List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<hydra-url/admin/clients?limit={limit}&offset={offset}>; rel="{page}"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. @param [Hash] opts the optional parameters @option opts [Integer] :limit The maximum amount of clients to returned, upper bound is 500 clients. @option opts [Integer] :offset The offset from where to start looking. @option opts [String] :name The name of the clients to filter by. @option opts [String] :owner The owner of the clients to filter by. @return [Array<OAuth2Client>]

# File lib/ory-hydra-client/api/admin_api.rb, line 1252
def list_o_auth2_clients(opts = {})
  data, _status_code, _headers = list_o_auth2_clients_with_http_info(opts)
  data
end
list_o_auth2_clients_with_http_info(opts = {}) click to toggle source

List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The &#x60;limit&#x60; parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. The "Link&quot; header is also included in successful responses, which contains one or more links for pagination, formatted like so: &#39;&lt;hydra-url/admin/clients?limit={limit}&offset={offset}>;; rel&#x3D;&quot;{page}&quot;&#39;, where page is one of the following applicable pages: &#39;first&#39;, &#39;next&#39;, &#39;last&#39;, and &#39;previous&#39;. Multiple links can be included in this header, and will be separated by a comma. @param [Hash] opts the optional parameters @option opts [Integer] :limit The maximum amount of clients to returned, upper bound is 500 clients. @option opts [Integer] :offset The offset from where to start looking. @option opts [String] :name The name of the clients to filter by. @option opts [String] :owner The owner of the clients to filter by. @return [Array<(Array<OAuth2Client>, Integer, Hash)>] Array<OAuth2Client> data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1265
def list_o_auth2_clients_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.list_o_auth2_clients ...'
  end
  # resource path
  local_var_path = '/clients'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<OAuth2Client>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.list_o_auth2_clients",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#list_o_auth2_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_o_auth2_client(id, body, opts = {}) click to toggle source

Patch an OAuth 2.0 Client Patch an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. @param id [String] @param body [Array<PatchDocument>] @param [Hash] opts the optional parameters @return [OAuth2Client]

# File lib/ory-hydra-client/api/admin_api.rb, line 1383
def patch_o_auth2_client(id, body, opts = {})
  data, _status_code, _headers = patch_o_auth2_client_with_http_info(id, body, opts)
  data
end
patch_o_auth2_client_with_http_info(id, body, opts = {}) click to toggle source

Patch an OAuth 2.0 Client Patch an existing OAuth 2.0 Client. If you pass &#x60;client_secret&#x60; the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. @param id [String] @param body [Array<PatchDocument>] @param [Hash] opts the optional parameters @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1394
def patch_o_auth2_client_with_http_info(id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.patch_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.patch_o_auth2_client"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.patch_o_auth2_client"
  end
  # resource path
  local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2Client'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.patch_o_auth2_client",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#patch_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
reject_login_request(login_challenge, opts = {}) click to toggle source

Reject a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate ("show the subject a login screen") a subject (in OAuth2 the proper name for subject is "resource owner"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. @param login_challenge [String] @param [Hash] opts the optional parameters @option opts [RejectRequest] :body @return [CompletedRequest]

# File lib/ory-hydra-client/api/admin_api.rb, line 1522
def reject_login_request(login_challenge, opts = {})
  data, _status_code, _headers = reject_login_request_with_http_info(login_challenge, opts)
  data
end
reject_login_request_with_http_info(login_challenge, opts = {}) click to toggle source

Reject a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate ("show the subject a login screen&quot;) a subject (in OAuth2 the proper name for subject is "resource owner&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. @param login_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

# File lib/ory-hydra-client/api/admin_api.rb, line 1533
def reject_login_request_with_http_info(login_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.reject_login_request ...'
  end
  # verify the required parameter 'login_challenge' is set
  if @api_client.config.client_side_validation && login_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'login_challenge' when calling AdminApi.reject_login_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/login/reject'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'login_challenge'] = login_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])

  # return_type
  return_type = opts[:debug_return_type] || 'CompletedRequest'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.reject_login_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_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
reject_logout_request(logout_challenge, opts = {}) click to toggle source

Reject a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. @param logout_challenge [String] @param [Hash] opts the optional parameters @option opts [RejectRequest] :body @return [nil]

# File lib/ory-hydra-client/api/admin_api.rb, line 1590
def reject_logout_request(logout_challenge, opts = {})
  reject_logout_request_with_http_info(logout_challenge, opts)
  nil
end
reject_logout_request_with_http_info(logout_challenge, opts = {}) click to toggle source

Reject a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. @param logout_challenge [String] @param [Hash] opts the optional parameters @option opts [RejectRequest] :body @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1601
def reject_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.reject_logout_request ...'
  end
  # verify the required parameter 'logout_challenge' is set
  if @api_client.config.client_side_validation && logout_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling AdminApi.reject_logout_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/logout/reject'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'logout_challenge'] = logout_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.reject_logout_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_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
revoke_authentication_session(subject, opts = {}) click to toggle source

Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. @param subject [String] @param [Hash] opts the optional parameters @return [nil]

# File lib/ory-hydra-client/api/admin_api.rb, line 1657
def revoke_authentication_session(subject, opts = {})
  revoke_authentication_session_with_http_info(subject, opts)
  nil
end
revoke_authentication_session_with_http_info(subject, opts = {}) click to toggle source

Invalidates All Login Sessions of a Certain User Invalidates a Subject&#39;s Authentication Session This endpoint invalidates a subject&#39;s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. @param subject [String] @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1667
def revoke_authentication_session_with_http_info(subject, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.revoke_authentication_session ...'
  end
  # verify the required parameter 'subject' is set
  if @api_client.config.client_side_validation && subject.nil?
    fail ArgumentError, "Missing the required parameter 'subject' when calling AdminApi.revoke_authentication_session"
  end
  # resource path
  local_var_path = '/oauth2/auth/sessions/login'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'subject'] = subject

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.revoke_authentication_session",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminApi#revoke_authentication_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_json_web_key(kid, set, opts = {}) click to toggle source

Update a JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param kid [String] The kid of the desired key @param set [String] The set @param [Hash] opts the optional parameters @option opts [JSONWebKey] :body @return [JSONWebKey]

# File lib/ory-hydra-client/api/admin_api.rb, line 1793
def update_json_web_key(kid, set, opts = {})
  data, _status_code, _headers = update_json_web_key_with_http_info(kid, set, opts)
  data
end
update_json_web_key_set(set, opts = {}) click to toggle source

Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param set [String] The set @param [Hash] opts the optional parameters @option opts [JSONWebKeySet] :body @return [JSONWebKeySet]

# File lib/ory-hydra-client/api/admin_api.rb, line 1865
def update_json_web_key_set(set, opts = {})
  data, _status_code, _headers = update_json_web_key_set_with_http_info(set, opts)
  data
end
update_json_web_key_set_with_http_info(set, opts = {}) click to toggle source

Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param set [String] The set @param [Hash] opts the optional parameters @option opts [JSONWebKeySet] :body @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1876
def update_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.update_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.update_json_web_key_set"
  end
  # resource path
  local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])

  # return_type
  return_type = opts[:debug_return_type] || 'JSONWebKeySet'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.update_json_web_key_set",
    :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#update_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_json_web_key_with_http_info(kid, set, opts = {}) click to toggle source

Update a JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @param kid [String] The kid of the desired key @param set [String] The set @param [Hash] opts the optional parameters @option opts [JSONWebKey] :body @return [Array<(JSONWebKey, Integer, Hash)>] JSONWebKey data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1805
def update_json_web_key_with_http_info(kid, set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.update_json_web_key ...'
  end
  # verify the required parameter 'kid' is set
  if @api_client.config.client_side_validation && kid.nil?
    fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.update_json_web_key"
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.update_json_web_key"
  end
  # resource path
  local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])

  # return_type
  return_type = opts[:debug_return_type] || 'JSONWebKey'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.update_json_web_key",
    :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#update_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_o_auth2_client(id, body, opts = {}) click to toggle source

Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. @param id [String] @param body [OAuth2Client] @param [Hash] opts the optional parameters @return [OAuth2Client]

# File lib/ory-hydra-client/api/admin_api.rb, line 1932
def update_o_auth2_client(id, body, opts = {})
  data, _status_code, _headers = update_o_auth2_client_with_http_info(id, body, opts)
  data
end
update_o_auth2_client_with_http_info(id, body, opts = {}) click to toggle source

Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. If you pass &#x60;client_secret&#x60; the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. @param id [String] @param body [OAuth2Client] @param [Hash] opts the optional parameters @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers

# File lib/ory-hydra-client/api/admin_api.rb, line 1943
def update_o_auth2_client_with_http_info(id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.update_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.update_o_auth2_client"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.update_o_auth2_client"
  end
  # resource path
  local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2Client'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"AdminApi.update_o_auth2_client",
    :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#update_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end