ory-hydra-client

OryHydraClient - the Ruby gem for the ORY Hydra

Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v1.8.5
  • Package version: v1.8.5
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build ory-hydra-client.gemspec

Then either install the gem locally:

gem install ./ory-hydra-client-v1.8.5.gem

(for development, run gem install --dev ./ory-hydra-client-v1.8.5.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'ory-hydra-client', '~> v1.8.5'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/ory/sdk, then add the following in the Gemfile:

gem 'ory-hydra-client', :git => 'https://github.com/ory/sdk.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'ory-hydra-client'

api_instance = OryHydraClient::AdminApi.new
consent_challenge = 'consent_challenge_example' # String | 
opts = {
  body: OryHydraClient::AcceptConsentRequest.new # AcceptConsentRequest | 
}

begin
  #Accept a Consent Request
  result = api_instance.accept_consent_request(consent_challenge, opts)
  p result
rescue OryHydraClient::ApiError => e
  puts "Exception when calling AdminApi->accept_consent_request: #{e}"
end

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
OryHydraClient::AdminApi accept_consent_request PUT /oauth2/auth/requests/consent/accept Accept a Consent Request
OryHydraClient::AdminApi accept_login_request PUT /oauth2/auth/requests/login/accept Accept a Login Request
OryHydraClient::AdminApi accept_logout_request PUT /oauth2/auth/requests/logout/accept Accept a Logout Request
OryHydraClient::AdminApi create_json_web_key_set POST /keys/set Generate a New JSON Web Key
OryHydraClient::AdminApi create_o_auth2_client POST /clients Create an OAuth 2.0 Client
OryHydraClient::AdminApi delete_json_web_key DELETE /keys/set/kid Delete a JSON Web Key
OryHydraClient::AdminApi delete_json_web_key_set DELETE /keys/set Delete a JSON Web Key Set
OryHydraClient::AdminApi delete_o_auth2_client DELETE /clients/id Deletes an OAuth 2.0 Client
OryHydraClient::AdminApi delete_o_auth2_token DELETE /oauth2/tokens Delete OAuth2 Access Tokens from a client
OryHydraClient::AdminApi flush_inactive_o_auth2_tokens POST /oauth2/flush Flush Expired OAuth2 Access Tokens
OryHydraClient::AdminApi get_consent_request GET /oauth2/auth/requests/consent Get Consent Request Information
OryHydraClient::AdminApi get_json_web_key GET /keys/set/kid Fetch a JSON Web Key
OryHydraClient::AdminApi get_json_web_key_set GET /keys/set Retrieve a JSON Web Key Set
OryHydraClient::AdminApi get_login_request GET /oauth2/auth/requests/login Get a Login Request
OryHydraClient::AdminApi get_logout_request GET /oauth2/auth/requests/logout Get a Logout Request
OryHydraClient::AdminApi get_o_auth2_client GET /clients/id Get an OAuth 2.0 Client.
OryHydraClient::AdminApi get_version GET /version Get Service Version
OryHydraClient::AdminApi introspect_o_auth2_token POST /oauth2/introspect Introspect OAuth2 Tokens
OryHydraClient::AdminApi is_instance_alive GET /health/alive Check Alive Status
OryHydraClient::AdminApi list_o_auth2_clients GET /clients List OAuth 2.0 Clients
OryHydraClient::AdminApi list_subject_consent_sessions GET /oauth2/auth/sessions/consent Lists All Consent Sessions of a Subject
OryHydraClient::AdminApi prometheus GET /metrics/prometheus Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
OryHydraClient::AdminApi reject_consent_request PUT /oauth2/auth/requests/consent/reject Reject a Consent Request
OryHydraClient::AdminApi reject_login_request PUT /oauth2/auth/requests/login/reject Reject a Login Request
OryHydraClient::AdminApi reject_logout_request PUT /oauth2/auth/requests/logout/reject Reject a Logout Request
OryHydraClient::AdminApi revoke_authentication_session DELETE /oauth2/auth/sessions/login Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session
OryHydraClient::AdminApi revoke_consent_sessions DELETE /oauth2/auth/sessions/consent Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
OryHydraClient::AdminApi update_json_web_key PUT /keys/set/kid Update a JSON Web Key
OryHydraClient::AdminApi update_json_web_key_set PUT /keys/set Update a JSON Web Key Set
OryHydraClient::AdminApi update_o_auth2_client PUT /clients/id Update an OAuth 2.0 Client
OryHydraClient::PublicApi disconnect_user GET /oauth2/sessions/logout OpenID Connect Front-Backchannel Enabled Logout
OryHydraClient::PublicApi discover_open_id_configuration GET /.well-known/openid-configuration OpenID Connect Discovery
OryHydraClient::PublicApi is_instance_ready GET /health/ready Check Readiness Status
OryHydraClient::PublicApi oauth2_token POST /oauth2/token The OAuth 2.0 Token Endpoint
OryHydraClient::PublicApi oauth_auth GET /oauth2/auth The OAuth 2.0 Authorize Endpoint
OryHydraClient::PublicApi revoke_o_auth2_token POST /oauth2/revoke Revoke OAuth2 Tokens
OryHydraClient::PublicApi userinfo GET /userinfo OpenID Connect Userinfo
OryHydraClient::PublicApi well_known GET /.well-known/jwks.json JSON Web Keys Discovery

Documentation for Models

Documentation for Authorization

basic

  • Type: HTTP basic authentication

oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://hydra.demo.ory.sh/oauth2/auth
  • Scopes:
    • offline: A scope required when requesting refresh tokens (alias for `offline_access`)
    • offline_access: A scope required when requesting refresh tokens
    • openid: Request an OpenID Connect ID Token