ory-client

OryClient - the Ruby gem for the Ory APIs

Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v0.2.0-alpha.42
  • Package version: v0.2.0-alpha.42
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build ory-client.gemspec

Then either install the gem locally:

gem install ./ory-client-v0.2.0-alpha.42.gem

(for development, run gem install --dev ./ory-client-v0.2.0-alpha.42.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-client', '~> v0.2.0-alpha.42'

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-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-client'

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

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

Documentation for API Endpoints

All URIs are relative to https://playground.projects.oryapis.com

Class Method HTTP request Description
OryClient::AdminApi accept_consent_request PUT /oauth2/auth/requests/consent/accept Accept a Consent Request
OryClient::AdminApi accept_login_request PUT /oauth2/auth/requests/login/accept Accept a Login Request
OryClient::AdminApi accept_logout_request PUT /oauth2/auth/requests/logout/accept Accept a Logout Request
OryClient::AdminApi create_json_web_key_set POST /keys/set Generate a New JSON Web Key
OryClient::AdminApi create_o_auth2_client POST /clients Create an OAuth 2.0 Client
OryClient::AdminApi delete_json_web_key DELETE /keys/set/kid Delete a JSON Web Key
OryClient::AdminApi delete_json_web_key_set DELETE /keys/set Delete a JSON Web Key Set
OryClient::AdminApi delete_o_auth2_client DELETE /clients/id Deletes an OAuth 2.0 Client
OryClient::AdminApi delete_o_auth2_token DELETE /oauth2/tokens Delete OAuth2 Access Tokens from a Client
OryClient::AdminApi delete_trusted_jwt_grant_issuer DELETE /trust/grants/jwt-bearer/issuers/id Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer
OryClient::AdminApi flush_inactive_o_auth2_tokens POST /oauth2/flush Flush Expired OAuth2 Access Tokens
OryClient::AdminApi get_consent_request GET /oauth2/auth/requests/consent Get Consent Request Information
OryClient::AdminApi get_json_web_key GET /keys/set/kid Fetch a JSON Web Key
OryClient::AdminApi get_json_web_key_set GET /keys/set Retrieve a JSON Web Key Set
OryClient::AdminApi get_login_request GET /oauth2/auth/requests/login Get a Login Request
OryClient::AdminApi get_logout_request GET /oauth2/auth/requests/logout Get a Logout Request
OryClient::AdminApi get_o_auth2_client GET /clients/id Get an OAuth 2.0 Client
OryClient::AdminApi get_trusted_jwt_grant_issuer GET /trust/grants/jwt-bearer/issuers/id Get a Trusted OAuth2 JWT Bearer Grant Type Issuer
OryClient::AdminApi introspect_o_auth2_token POST /oauth2/introspect Introspect OAuth2 Tokens
OryClient::AdminApi list_o_auth2_clients GET /clients List OAuth 2.0 Clients
OryClient::AdminApi list_subject_consent_sessions GET /oauth2/auth/sessions/consent Lists All Consent Sessions of a Subject
OryClient::AdminApi list_trusted_jwt_grant_issuers GET /trust/grants/jwt-bearer/issuers List Trusted OAuth2 JWT Bearer Grant Type Issuers
OryClient::AdminApi patch_o_auth2_client PATCH /clients/id Patch an OAuth 2.0 Client
OryClient::AdminApi reject_consent_request PUT /oauth2/auth/requests/consent/reject Reject a Consent Request
OryClient::AdminApi reject_login_request PUT /oauth2/auth/requests/login/reject Reject a Login Request
OryClient::AdminApi reject_logout_request PUT /oauth2/auth/requests/logout/reject Reject a Logout Request
OryClient::AdminApi revoke_authentication_session DELETE /oauth2/auth/sessions/login Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session
OryClient::AdminApi revoke_consent_sessions DELETE /oauth2/auth/sessions/consent Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
OryClient::AdminApi trust_jwt_grant_issuer POST /trust/grants/jwt-bearer/issuers Trust an OAuth2 JWT Bearer Grant Type Issuer
OryClient::AdminApi update_json_web_key PUT /keys/set/kid Update a JSON Web Key
OryClient::AdminApi update_json_web_key_set PUT /keys/set Update a JSON Web Key Set
OryClient::AdminApi update_o_auth2_client PUT /clients/id Update an OAuth 2.0 Client
OryClient::MetadataApi get_version GET /version Return Running Software Version.
OryClient::MetadataApi is_alive GET /health/alive Check HTTP Server Status
OryClient::MetadataApi is_ready GET /health/ready Check HTTP Server and Database Status
OryClient::PublicApi disconnect_user GET /oauth2/sessions/logout OpenID Connect Front-Backchannel Enabled Logout
OryClient::PublicApi discover_open_id_configuration GET /.well-known/openid-configuration OpenID Connect Discovery
OryClient::PublicApi dynamic_client_registration_create_o_auth2_client POST /connect/register Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
OryClient::PublicApi dynamic_client_registration_delete_o_auth2_client DELETE /connect/register/id Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
OryClient::PublicApi dynamic_client_registration_get_o_auth2_client GET /connect/register/id Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
OryClient::PublicApi dynamic_client_registration_update_o_auth2_client PUT /connect/register/id Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
OryClient::PublicApi oauth2_token POST /oauth2/token The OAuth 2.0 Token Endpoint
OryClient::PublicApi oauth_auth GET /oauth2/auth The OAuth 2.0 Authorize Endpoint
OryClient::PublicApi revoke_o_auth2_token POST /oauth2/revoke Revoke OAuth2 Tokens
OryClient::PublicApi userinfo GET /userinfo OpenID Connect Userinfo
OryClient::PublicApi well_known GET /.well-known/jwks.json JSON Web Keys Discovery
OryClient::ReadApi get_check GET /relation-tuples/check/openapi # Check a relation tuple
OryClient::ReadApi get_check_mirror_status GET /relation-tuples/check # Check a relation tuple
OryClient::ReadApi get_expand GET /relation-tuples/expand # Expand a Relation Tuple
OryClient::ReadApi get_relation_tuples GET /relation-tuples # Query relation tuples
OryClient::ReadApi post_check POST /relation-tuples/check/openapi # Check a relation tuple
OryClient::ReadApi post_check_mirror_status POST /relation-tuples/check # Check a relation tuple
OryClient::V0alpha2Api admin_create_identity POST /admin/identities Create an Identity
OryClient::V0alpha2Api admin_create_self_service_recovery_link POST /admin/recovery/link Create a Recovery Link
OryClient::V0alpha2Api admin_delete_identity DELETE /admin/identities/id Delete an Identity
OryClient::V0alpha2Api admin_delete_identity_sessions DELETE /admin/identities/id/sessions Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
OryClient::V0alpha2Api admin_extend_session PATCH /admin/sessions/id/extend Calling this endpoint extends the given session ID. If session.earliest_possible_extend is set it will only extend the session after the specified time has passed.
OryClient::V0alpha2Api admin_get_identity GET /admin/identities/id Get an Identity
OryClient::V0alpha2Api admin_list_identities GET /admin/identities List Identities
OryClient::V0alpha2Api admin_list_identity_sessions GET /admin/identities/id/sessions This endpoint returns all sessions that belong to the given Identity.
OryClient::V0alpha2Api admin_patch_identity PATCH /admin/identities/id Partially updates an Identity's field using JSON Patch
OryClient::V0alpha2Api admin_update_identity PUT /admin/identities/id Update an Identity
OryClient::V0alpha2Api create_project POST /projects # Create a Project
OryClient::V0alpha2Api create_project_api_key POST /projects/project/tokens # Create API Token
OryClient::V0alpha2Api create_self_service_logout_flow_url_for_browsers GET /self-service/logout/browser Create a Logout URL for Browsers
OryClient::V0alpha2Api delete_project_api_key DELETE /projects/project/tokens/token_id # Delete API Token
OryClient::V0alpha2Api get_identity_schema GET /schemas/id
OryClient::V0alpha2Api get_project GET /projects/project_id # Get a Project
OryClient::V0alpha2Api get_project_members GET /projects/project_id/members Get all members associated with this project.
OryClient::V0alpha2Api get_self_service_error GET /self-service/errors Get Self-Service Errors
OryClient::V0alpha2Api get_self_service_login_flow GET /self-service/login/flows Get Login Flow
OryClient::V0alpha2Api get_self_service_recovery_flow GET /self-service/recovery/flows Get Recovery Flow
OryClient::V0alpha2Api get_self_service_registration_flow GET /self-service/registration/flows Get Registration Flow
OryClient::V0alpha2Api get_self_service_settings_flow GET /self-service/settings/flows Get Settings Flow
OryClient::V0alpha2Api get_self_service_verification_flow GET /self-service/verification/flows # Get Verification Flow
OryClient::V0alpha2Api get_web_authn_java_script GET /.well-known/ory/webauthn.js Get WebAuthn JavaScript
OryClient::V0alpha2Api initialize_self_service_login_flow_for_browsers GET /self-service/login/browser Initialize Login Flow for Browsers
OryClient::V0alpha2Api initialize_self_service_login_flow_without_browser GET /self-service/login/api Initialize Login Flow for APIs, Services, Apps, ...
OryClient::V0alpha2Api initialize_self_service_recovery_flow_for_browsers GET /self-service/recovery/browser Initialize Recovery Flow for Browsers
OryClient::V0alpha2Api initialize_self_service_recovery_flow_without_browser GET /self-service/recovery/api Initialize Recovery Flow for APIs, Services, Apps, ...
OryClient::V0alpha2Api initialize_self_service_registration_flow_for_browsers GET /self-service/registration/browser Initialize Registration Flow for Browsers
OryClient::V0alpha2Api initialize_self_service_registration_flow_without_browser GET /self-service/registration/api Initialize Registration Flow for APIs, Services, Apps, ...
OryClient::V0alpha2Api initialize_self_service_settings_flow_for_browsers GET /self-service/settings/browser Initialize Settings Flow for Browsers
OryClient::V0alpha2Api initialize_self_service_settings_flow_without_browser GET /self-service/settings/api Initialize Settings Flow for APIs, Services, Apps, ...
OryClient::V0alpha2Api initialize_self_service_verification_flow_for_browsers GET /self-service/verification/browser Initialize Verification Flow for Browser Clients
OryClient::V0alpha2Api initialize_self_service_verification_flow_without_browser GET /self-service/verification/api Initialize Verification Flow for APIs, Services, Apps, ...
OryClient::V0alpha2Api list_identity_schemas GET /schemas
OryClient::V0alpha2Api list_project_api_keys GET /projects/project/tokens # List a Project's API Tokens
OryClient::V0alpha2Api list_projects GET /projects # List All Projects
OryClient::V0alpha2Api list_sessions GET /sessions This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the /sessions/whoami endpoint.
OryClient::V0alpha2Api patch_project PATCH /projects/project_id Patch an Ory Cloud Project Configuration`
OryClient::V0alpha2Api purge_project DELETE /projects/project_id # Irrecoverably Purge a Project
OryClient::V0alpha2Api remove_project_member DELETE /projects/project_id/members/member_id Remove a member associated with this project. This also sets their invite status to REMOVED.
OryClient::V0alpha2Api revoke_session DELETE /sessions/id Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted.
OryClient::V0alpha2Api revoke_sessions DELETE /sessions Calling this endpoint invalidates all except the current session that belong to the logged-in user. Session data are not deleted.
OryClient::V0alpha2Api submit_self_service_login_flow POST /self-service/login Submit a Login Flow
OryClient::V0alpha2Api submit_self_service_logout_flow GET /self-service/logout Complete Self-Service Logout
OryClient::V0alpha2Api submit_self_service_logout_flow_without_browser DELETE /self-service/logout/api Perform Logout for APIs, Services, Apps, ...
OryClient::V0alpha2Api submit_self_service_recovery_flow POST /self-service/recovery Complete Recovery Flow
OryClient::V0alpha2Api submit_self_service_registration_flow POST /self-service/registration Submit a Registration Flow
OryClient::V0alpha2Api submit_self_service_settings_flow POST /self-service/settings Complete Settings Flow
OryClient::V0alpha2Api submit_self_service_verification_flow POST /self-service/verification # Complete Verification Flow
OryClient::V0alpha2Api to_session GET /sessions/whoami Check Who the Current HTTP Session Belongs To
OryClient::V0alpha2Api update_project PUT /projects/project_id # Update an Ory Cloud Project Configuration
OryClient::WriteApi create_relation_tuple PUT /admin/relation-tuples # Create a Relation Tuple
OryClient::WriteApi delete_relation_tuples DELETE /admin/relation-tuples # Delete Relation Tuples
OryClient::WriteApi patch_relation_tuples PATCH /admin/relation-tuples # Patch Multiple Relation Tuples

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

oryAccessToken

  • Type: Bearer authentication