# OryClient::V0alpha2Api All URIs are relative to *https://playground.projects.oryapis.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**admin_accept_o_auth2_consent_request**](V0alpha2Api.md#admin_accept_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept an OAuth 2.0 Consent Request | | [**admin_accept_o_auth2_login_request**](V0alpha2Api.md#admin_accept_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept an OAuth 2.0 Login Request | | [**admin_accept_o_auth2_logout_request**](V0alpha2Api.md#admin_accept_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept an OAuth 2.0 Logout Request | | [**admin_create_identity**](V0alpha2Api.md#admin_create_identity) | **POST** /admin/identities | Create an Identity | | [**admin_create_json_web_key_set**](V0alpha2Api.md#admin_create_json_web_key_set) | **POST** /admin/keys/{set} | Generate a New JSON Web Key | | [**admin_create_o_auth2_client**](V0alpha2Api.md#admin_create_o_auth2_client) | **POST** /admin/clients | Create an OAuth 2.0 Client | | [**admin_create_self_service_recovery_code**](V0alpha2Api.md#admin_create_self_service_recovery_code) | **POST** /admin/recovery/code | Create a Recovery Link | | [**admin_create_self_service_recovery_link**](V0alpha2Api.md#admin_create_self_service_recovery_link) | **POST** /admin/recovery/link | Create a Recovery Link | | [**admin_delete_identity**](V0alpha2Api.md#admin_delete_identity) | **DELETE** /admin/identities/{id} | Delete an Identity | | [**admin_delete_identity_sessions**](V0alpha2Api.md#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. | | [**admin_delete_json_web_key**](V0alpha2Api.md#admin_delete_json_web_key) | **DELETE** /admin/keys/{set}/{kid} | Delete a JSON Web Key | | [**admin_delete_json_web_key_set**](V0alpha2Api.md#admin_delete_json_web_key_set) | **DELETE** /admin/keys/{set} | Delete a JSON Web Key Set | | [**admin_delete_o_auth2_client**](V0alpha2Api.md#admin_delete_o_auth2_client) | **DELETE** /admin/clients/{id} | Deletes an OAuth 2.0 Client | | [**admin_delete_o_auth2_token**](V0alpha2Api.md#admin_delete_o_auth2_token) | **DELETE** /admin/oauth2/tokens | Delete OAuth2 Access Tokens from a Client | | [**admin_delete_trusted_o_auth2_jwt_grant_issuer**](V0alpha2Api.md#admin_delete_trusted_o_auth2_jwt_grant_issuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer | | [**admin_extend_session**](V0alpha2Api.md#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. | | [**admin_get_identity**](V0alpha2Api.md#admin_get_identity) | **GET** /admin/identities/{id} | Get an Identity | | [**admin_get_json_web_key**](V0alpha2Api.md#admin_get_json_web_key) | **GET** /admin/keys/{set}/{kid} | Fetch a JSON Web Key | | [**admin_get_json_web_key_set**](V0alpha2Api.md#admin_get_json_web_key_set) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set | | [**admin_get_o_auth2_client**](V0alpha2Api.md#admin_get_o_auth2_client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client | | [**admin_get_o_auth2_consent_request**](V0alpha2Api.md#admin_get_o_auth2_consent_request) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request Information | | [**admin_get_o_auth2_login_request**](V0alpha2Api.md#admin_get_o_auth2_login_request) | **GET** /admin/oauth2/auth/requests/login | Get an OAuth 2.0 Login Request | | [**admin_get_o_auth2_logout_request**](V0alpha2Api.md#admin_get_o_auth2_logout_request) | **GET** /admin/oauth2/auth/requests/logout | Get an OAuth 2.0 Logout Request | | [**admin_get_trusted_o_auth2_jwt_grant_issuer**](V0alpha2Api.md#admin_get_trusted_o_auth2_jwt_grant_issuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer | | [**admin_introspect_o_auth2_token**](V0alpha2Api.md#admin_introspect_o_auth2_token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access or Refresh Tokens | | [**admin_list_courier_messages**](V0alpha2Api.md#admin_list_courier_messages) | **GET** /admin/courier/messages | List Messages | | [**admin_list_identities**](V0alpha2Api.md#admin_list_identities) | **GET** /admin/identities | List Identities | | [**admin_list_identity_sessions**](V0alpha2Api.md#admin_list_identity_sessions) | **GET** /admin/identities/{id}/sessions | This endpoint returns all sessions that belong to the given Identity. | | [**admin_list_o_auth2_clients**](V0alpha2Api.md#admin_list_o_auth2_clients) | **GET** /admin/clients | List OAuth 2.0 Clients | | [**admin_list_o_auth2_subject_consent_sessions**](V0alpha2Api.md#admin_list_o_auth2_subject_consent_sessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject | | [**admin_list_trusted_o_auth2_jwt_grant_issuers**](V0alpha2Api.md#admin_list_trusted_o_auth2_jwt_grant_issuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers | | [**admin_patch_identity**](V0alpha2Api.md#admin_patch_identity) | **PATCH** /admin/identities/{id} | Patch an Identity | | [**admin_patch_o_auth2_client**](V0alpha2Api.md#admin_patch_o_auth2_client) | **PATCH** /admin/clients/{id} | Patch an OAuth 2.0 Client | | [**admin_reject_o_auth2_consent_request**](V0alpha2Api.md#admin_reject_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject an OAuth 2.0 Consent Request | | [**admin_reject_o_auth2_login_request**](V0alpha2Api.md#admin_reject_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject an OAuth 2.0 Login Request | | [**admin_reject_o_auth2_logout_request**](V0alpha2Api.md#admin_reject_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject an OAuth 2.0 Logout Request | | [**admin_revoke_o_auth2_consent_sessions**](V0alpha2Api.md#admin_revoke_o_auth2_consent_sessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client | | [**admin_revoke_o_auth2_login_sessions**](V0alpha2Api.md#admin_revoke_o_auth2_login_sessions) | **DELETE** /admin/oauth2/auth/sessions/login | Invalidates All OAuth 2.0 Login Sessions of a Certain User | | [**admin_trust_o_auth2_jwt_grant_issuer**](V0alpha2Api.md#admin_trust_o_auth2_jwt_grant_issuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer | | [**admin_update_identity**](V0alpha2Api.md#admin_update_identity) | **PUT** /admin/identities/{id} | Update an Identity | | [**admin_update_json_web_key**](V0alpha2Api.md#admin_update_json_web_key) | **PUT** /admin/keys/{set}/{kid} | Update a JSON Web Key | | [**admin_update_json_web_key_set**](V0alpha2Api.md#admin_update_json_web_key_set) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set | | [**admin_update_o_auth2_client**](V0alpha2Api.md#admin_update_o_auth2_client) | **PUT** /admin/clients/{id} | Update an OAuth 2.0 Client | | [**create_project**](V0alpha2Api.md#create_project) | **POST** /projects | Create a Project | | [**create_project_api_key**](V0alpha2Api.md#create_project_api_key) | **POST** /projects/{project}/tokens | Create API Token | | [**create_self_service_logout_flow_url_for_browsers**](V0alpha2Api.md#create_self_service_logout_flow_url_for_browsers) | **GET** /self-service/logout/browser | Create a Logout URL for Browsers | | [**delete_project_api_key**](V0alpha2Api.md#delete_project_api_key) | **DELETE** /projects/{project}/tokens/{token_id} | Delete API Token | | [**discover_json_web_keys**](V0alpha2Api.md#discover_json_web_keys) | **GET** /.well-known/jwks.json | Discover JSON Web Keys | | [**discover_oidc_configuration**](V0alpha2Api.md#discover_oidc_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery | | [**dynamic_client_registration_create_o_auth2_client**](V0alpha2Api.md#dynamic_client_registration_create_o_auth2_client) | **POST** /oauth2/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | | [**dynamic_client_registration_delete_o_auth2_client**](V0alpha2Api.md#dynamic_client_registration_delete_o_auth2_client) | **DELETE** /oauth2/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | | [**dynamic_client_registration_get_o_auth2_client**](V0alpha2Api.md#dynamic_client_registration_get_o_auth2_client) | **GET** /oauth2/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | | [**dynamic_client_registration_update_o_auth2_client**](V0alpha2Api.md#dynamic_client_registration_update_o_auth2_client) | **PUT** /oauth2/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | | [**get_identity_schema**](V0alpha2Api.md#get_identity_schema) | **GET** /schemas/{id} | | | [**get_oidc_user_info**](V0alpha2Api.md#get_oidc_user_info) | **GET** /userinfo | OpenID Connect Userinfo | | [**get_project**](V0alpha2Api.md#get_project) | **GET** /projects/{project_id} | Get a Project | | [**get_project_members**](V0alpha2Api.md#get_project_members) | **GET** /projects/{project_id}/members | Get all members associated with this project. | | [**get_self_service_error**](V0alpha2Api.md#get_self_service_error) | **GET** /self-service/errors | Get Self-Service Errors | | [**get_self_service_login_flow**](V0alpha2Api.md#get_self_service_login_flow) | **GET** /self-service/login/flows | Get Login Flow | | [**get_self_service_recovery_flow**](V0alpha2Api.md#get_self_service_recovery_flow) | **GET** /self-service/recovery/flows | Get Recovery Flow | | [**get_self_service_registration_flow**](V0alpha2Api.md#get_self_service_registration_flow) | **GET** /self-service/registration/flows | Get Registration Flow | | [**get_self_service_settings_flow**](V0alpha2Api.md#get_self_service_settings_flow) | **GET** /self-service/settings/flows | Get Settings Flow | | [**get_self_service_verification_flow**](V0alpha2Api.md#get_self_service_verification_flow) | **GET** /self-service/verification/flows | Get Verification Flow | | [**get_web_authn_java_script**](V0alpha2Api.md#get_web_authn_java_script) | **GET** /.well-known/ory/webauthn.js | Get WebAuthn JavaScript | | [**initialize_self_service_login_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_login_flow_for_browsers) | **GET** /self-service/login/browser | Initialize Login Flow for Browsers | | [**initialize_self_service_login_flow_without_browser**](V0alpha2Api.md#initialize_self_service_login_flow_without_browser) | **GET** /self-service/login/api | Initialize Login Flow for APIs, Services, Apps, ... | | [**initialize_self_service_recovery_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_recovery_flow_for_browsers) | **GET** /self-service/recovery/browser | Initialize Recovery Flow for Browsers | | [**initialize_self_service_recovery_flow_without_browser**](V0alpha2Api.md#initialize_self_service_recovery_flow_without_browser) | **GET** /self-service/recovery/api | Initialize Recovery Flow for APIs, Services, Apps, ... | | [**initialize_self_service_registration_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_registration_flow_for_browsers) | **GET** /self-service/registration/browser | Initialize Registration Flow for Browsers | | [**initialize_self_service_registration_flow_without_browser**](V0alpha2Api.md#initialize_self_service_registration_flow_without_browser) | **GET** /self-service/registration/api | Initialize Registration Flow for APIs, Services, Apps, ... | | [**initialize_self_service_settings_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_settings_flow_for_browsers) | **GET** /self-service/settings/browser | Initialize Settings Flow for Browsers | | [**initialize_self_service_settings_flow_without_browser**](V0alpha2Api.md#initialize_self_service_settings_flow_without_browser) | **GET** /self-service/settings/api | Initialize Settings Flow for APIs, Services, Apps, ... | | [**initialize_self_service_verification_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_verification_flow_for_browsers) | **GET** /self-service/verification/browser | Initialize Verification Flow for Browser Clients | | [**initialize_self_service_verification_flow_without_browser**](V0alpha2Api.md#initialize_self_service_verification_flow_without_browser) | **GET** /self-service/verification/api | Initialize Verification Flow for APIs, Services, Apps, ... | | [**list_identity_schemas**](V0alpha2Api.md#list_identity_schemas) | **GET** /schemas | | | [**list_project_api_keys**](V0alpha2Api.md#list_project_api_keys) | **GET** /projects/{project}/tokens | List a Project's API Tokens | | [**list_projects**](V0alpha2Api.md#list_projects) | **GET** /projects | List All Projects | | [**list_sessions**](V0alpha2Api.md#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. | | [**patch_project**](V0alpha2Api.md#patch_project) | **PATCH** /projects/{project_id} | Patch an Ory Cloud Project Configuration` | | [**perform_o_auth2_authorization_flow**](V0alpha2Api.md#perform_o_auth2_authorization_flow) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint | | [**perform_o_auth2_token_flow**](V0alpha2Api.md#perform_o_auth2_token_flow) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint | | [**perform_oidc_front_or_back_channel_logout**](V0alpha2Api.md#perform_oidc_front_or_back_channel_logout) | **GET** /oauth2/sessions/logout | OpenID Connect Front- or Back-channel Enabled Logout | | [**purge_project**](V0alpha2Api.md#purge_project) | **DELETE** /projects/{project_id} | Irrecoverably Purge a Project | | [**remove_project_member**](V0alpha2Api.md#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`. | | [**revoke_o_auth2_token**](V0alpha2Api.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke an OAuth2 Access or Refresh Token | | [**revoke_session**](V0alpha2Api.md#revoke_session) | **DELETE** /sessions/{id} | Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted. | | [**revoke_sessions**](V0alpha2Api.md#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. | | [**submit_self_service_login_flow**](V0alpha2Api.md#submit_self_service_login_flow) | **POST** /self-service/login | Submit a Login Flow | | [**submit_self_service_logout_flow**](V0alpha2Api.md#submit_self_service_logout_flow) | **GET** /self-service/logout | Complete Self-Service Logout | | [**submit_self_service_logout_flow_without_browser**](V0alpha2Api.md#submit_self_service_logout_flow_without_browser) | **DELETE** /self-service/logout/api | Perform Logout for APIs, Services, Apps, ... | | [**submit_self_service_recovery_flow**](V0alpha2Api.md#submit_self_service_recovery_flow) | **POST** /self-service/recovery | Complete Recovery Flow | | [**submit_self_service_registration_flow**](V0alpha2Api.md#submit_self_service_registration_flow) | **POST** /self-service/registration | Submit a Registration Flow | | [**submit_self_service_settings_flow**](V0alpha2Api.md#submit_self_service_settings_flow) | **POST** /self-service/settings | Complete Settings Flow | | [**submit_self_service_verification_flow**](V0alpha2Api.md#submit_self_service_verification_flow) | **POST** /self-service/verification | Complete Verification Flow | | [**to_session**](V0alpha2Api.md#to_session) | **GET** /sessions/whoami | Check Who the Current HTTP Session Belongs To | | [**update_project**](V0alpha2Api.md#update_project) | **PUT** /projects/{project_id} | Update an Ory Cloud Project Configuration | ## admin_accept_o_auth2_consent_request > admin_accept_o_auth2_consent_request(consent_challenge, opts) Accept an OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new consent_challenge = 'consent_challenge_example' # String | opts = { accept_o_auth2_consent_request: OryClient::AcceptOAuth2ConsentRequest.new # AcceptOAuth2ConsentRequest | } begin # Accept an OAuth 2.0 Consent Request result = api_instance.admin_accept_o_auth2_consent_request(consent_challenge, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_accept_o_auth2_consent_request: #{e}" end ``` #### Using the admin_accept_o_auth2_consent_request_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_accept_o_auth2_consent_request_with_http_info(consent_challenge, opts) ```ruby begin # Accept an OAuth 2.0 Consent Request data, status_code, headers = api_instance.admin_accept_o_auth2_consent_request_with_http_info(consent_challenge, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_accept_o_auth2_consent_request_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **consent_challenge** | **String** | | | | **accept_o_auth2_consent_request** | [**AcceptOAuth2ConsentRequest**](AcceptOAuth2ConsentRequest.md) | | [optional] | ### Return type [**SuccessfulOAuth2RequestResponse**](SuccessfulOAuth2RequestResponse.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_accept_o_auth2_login_request > admin_accept_o_auth2_login_request(login_challenge, opts) Accept an OAuth 2.0 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new login_challenge = 'login_challenge_example' # String | opts = { accept_o_auth2_login_request: OryClient::AcceptOAuth2LoginRequest.new({subject: 'subject_example'}) # AcceptOAuth2LoginRequest | } begin # Accept an OAuth 2.0 Login Request result = api_instance.admin_accept_o_auth2_login_request(login_challenge, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_accept_o_auth2_login_request: #{e}" end ``` #### Using the admin_accept_o_auth2_login_request_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_accept_o_auth2_login_request_with_http_info(login_challenge, opts) ```ruby begin # Accept an OAuth 2.0 Login Request data, status_code, headers = api_instance.admin_accept_o_auth2_login_request_with_http_info(login_challenge, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_accept_o_auth2_login_request_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **login_challenge** | **String** | | | | **accept_o_auth2_login_request** | [**AcceptOAuth2LoginRequest**](AcceptOAuth2LoginRequest.md) | | [optional] | ### Return type [**SuccessfulOAuth2RequestResponse**](SuccessfulOAuth2RequestResponse.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_accept_o_auth2_logout_request > admin_accept_o_auth2_logout_request(logout_challenge) Accept an OAuth 2.0 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. The response contains a redirect URL which the consent provider should redirect the user-agent to. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new logout_challenge = 'logout_challenge_example' # String | begin # Accept an OAuth 2.0 Logout Request result = api_instance.admin_accept_o_auth2_logout_request(logout_challenge) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_accept_o_auth2_logout_request: #{e}" end ``` #### Using the admin_accept_o_auth2_logout_request_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_accept_o_auth2_logout_request_with_http_info(logout_challenge) ```ruby begin # Accept an OAuth 2.0 Logout Request data, status_code, headers = api_instance.admin_accept_o_auth2_logout_request_with_http_info(logout_challenge) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_accept_o_auth2_logout_request_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **logout_challenge** | **String** | | | ### Return type [**SuccessfulOAuth2RequestResponse**](SuccessfulOAuth2RequestResponse.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_create_identity > admin_create_identity(opts) Create an Identity This endpoint creates an identity. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { admin_create_identity_body: OryClient::AdminCreateIdentityBody.new({schema_id: 'schema_id_example', traits: 3.56}) # AdminCreateIdentityBody | } begin # Create an Identity result = api_instance.admin_create_identity(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_identity: #{e}" end ``` #### Using the admin_create_identity_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_create_identity_with_http_info(opts) ```ruby begin # Create an Identity data, status_code, headers = api_instance.admin_create_identity_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_identity_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **admin_create_identity_body** | [**AdminCreateIdentityBody**](AdminCreateIdentityBody.md) | | [optional] | ### Return type [**Identity**](Identity.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_create_json_web_key_set > admin_create_json_web_key_set(set, admin_create_json_web_key_set_body) 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new set = 'set_example' # String | The JSON Web Key Set admin_create_json_web_key_set_body = OryClient::AdminCreateJsonWebKeySetBody.new({alg: 'alg_example', kid: 'kid_example', use: 'use_example'}) # AdminCreateJsonWebKeySetBody | begin # Generate a New JSON Web Key result = api_instance.admin_create_json_web_key_set(set, admin_create_json_web_key_set_body) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_json_web_key_set: #{e}" end ``` #### Using the admin_create_json_web_key_set_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_create_json_web_key_set_with_http_info(set, admin_create_json_web_key_set_body) ```ruby begin # Generate a New JSON Web Key data, status_code, headers = api_instance.admin_create_json_web_key_set_with_http_info(set, admin_create_json_web_key_set_body) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_json_web_key_set_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **set** | **String** | The JSON Web Key Set | | | **admin_create_json_web_key_set_body** | [**AdminCreateJsonWebKeySetBody**](AdminCreateJsonWebKeySetBody.md) | | | ### Return type [**JsonWebKeySet**](JsonWebKeySet.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_create_o_auth2_client > admin_create_o_auth2_client(o_auth2_client) Create an OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new o_auth2_client = OryClient::OAuth2Client.new # OAuth2Client | begin # Create an OAuth 2.0 Client result = api_instance.admin_create_o_auth2_client(o_auth2_client) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_o_auth2_client: #{e}" end ``` #### Using the admin_create_o_auth2_client_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_create_o_auth2_client_with_http_info(o_auth2_client) ```ruby begin # Create an OAuth 2.0 Client data, status_code, headers = api_instance.admin_create_o_auth2_client_with_http_info(o_auth2_client) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_o_auth2_client_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | | | ### Return type [**OAuth2Client**](OAuth2Client.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_create_self_service_recovery_code > admin_create_self_service_recovery_code(opts) Create a Recovery Link This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { admin_create_self_service_recovery_code_body: OryClient::AdminCreateSelfServiceRecoveryCodeBody.new({identity_id: 'identity_id_example'}) # AdminCreateSelfServiceRecoveryCodeBody | } begin # Create a Recovery Link result = api_instance.admin_create_self_service_recovery_code(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_self_service_recovery_code: #{e}" end ``` #### Using the admin_create_self_service_recovery_code_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_create_self_service_recovery_code_with_http_info(opts) ```ruby begin # Create a Recovery Link data, status_code, headers = api_instance.admin_create_self_service_recovery_code_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_self_service_recovery_code_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **admin_create_self_service_recovery_code_body** | [**AdminCreateSelfServiceRecoveryCodeBody**](AdminCreateSelfServiceRecoveryCodeBody.md) | | [optional] | ### Return type [**SelfServiceRecoveryCode**](SelfServiceRecoveryCode.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_create_self_service_recovery_link > admin_create_self_service_recovery_link(opts) Create a Recovery Link This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { admin_create_self_service_recovery_link_body: OryClient::AdminCreateSelfServiceRecoveryLinkBody.new({identity_id: 'identity_id_example'}) # AdminCreateSelfServiceRecoveryLinkBody | } begin # Create a Recovery Link result = api_instance.admin_create_self_service_recovery_link(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_self_service_recovery_link: #{e}" end ``` #### Using the admin_create_self_service_recovery_link_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_create_self_service_recovery_link_with_http_info(opts) ```ruby begin # Create a Recovery Link data, status_code, headers = api_instance.admin_create_self_service_recovery_link_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_self_service_recovery_link_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **admin_create_self_service_recovery_link_body** | [**AdminCreateSelfServiceRecoveryLinkBody**](AdminCreateSelfServiceRecoveryLinkBody.md) | | [optional] | ### Return type [**SelfServiceRecoveryLink**](SelfServiceRecoveryLink.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_delete_identity > admin_delete_identity(id) Delete an Identity Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID is the identity's ID. begin # Delete an Identity api_instance.admin_delete_identity(id) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_identity: #{e}" end ``` #### Using the admin_delete_identity_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_delete_identity_with_http_info(id) ```ruby begin # Delete an Identity data, status_code, headers = api_instance.admin_delete_identity_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_identity_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID is the identity's ID. | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_delete_identity_sessions > admin_delete_identity_sessions(id) Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. This endpoint is useful for: To forcefully logout Identity from all devices and sessions ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID is the identity's ID. begin # Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. api_instance.admin_delete_identity_sessions(id) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_identity_sessions: #{e}" end ``` #### Using the admin_delete_identity_sessions_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_delete_identity_sessions_with_http_info(id) ```ruby begin # Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. data, status_code, headers = api_instance.admin_delete_identity_sessions_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_identity_sessions_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID is the identity's ID. | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_delete_json_web_key > admin_delete_json_web_key(set, kid) 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new set = 'set_example' # String | The JSON Web Key Set kid = 'kid_example' # String | The JSON Web Key ID (kid) begin # Delete a JSON Web Key api_instance.admin_delete_json_web_key(set, kid) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_json_web_key: #{e}" end ``` #### Using the admin_delete_json_web_key_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_delete_json_web_key_with_http_info(set, kid) ```ruby begin # Delete a JSON Web Key data, status_code, headers = api_instance.admin_delete_json_web_key_with_http_info(set, kid) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_json_web_key_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **set** | **String** | The JSON Web Key Set | | | **kid** | **String** | The JSON Web Key ID (kid) | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_delete_json_web_key_set > admin_delete_json_web_key_set(set) 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new set = 'set_example' # String | The JSON Web Key Set begin # Delete a JSON Web Key Set api_instance.admin_delete_json_web_key_set(set) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_json_web_key_set: #{e}" end ``` #### Using the admin_delete_json_web_key_set_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_delete_json_web_key_set_with_http_info(set) ```ruby begin # Delete a JSON Web Key Set data, status_code, headers = api_instance.admin_delete_json_web_key_set_with_http_info(set) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_json_web_key_set_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **set** | **String** | The JSON Web Key Set | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_delete_o_auth2_client > admin_delete_o_auth2_client(id) 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. Make sure that this endpoint is well protected and only callable by first-party components. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The id of the OAuth 2.0 Client. begin # Deletes an OAuth 2.0 Client api_instance.admin_delete_o_auth2_client(id) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_o_auth2_client: #{e}" end ``` #### Using the admin_delete_o_auth2_client_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_delete_o_auth2_client_with_http_info(id) ```ruby begin # Deletes an OAuth 2.0 Client data, status_code, headers = api_instance.admin_delete_o_auth2_client_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_o_auth2_client_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The id of the OAuth 2.0 Client. | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_delete_o_auth2_token > admin_delete_o_auth2_token(client_id) Delete OAuth2 Access Tokens from a Client This endpoint deletes OAuth2 access tokens issued for a client from the database ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new client_id = 'client_id_example' # String | begin # Delete OAuth2 Access Tokens from a Client api_instance.admin_delete_o_auth2_token(client_id) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_o_auth2_token: #{e}" end ``` #### Using the admin_delete_o_auth2_token_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_delete_o_auth2_token_with_http_info(client_id) ```ruby begin # Delete OAuth2 Access Tokens from a Client data, status_code, headers = api_instance.admin_delete_o_auth2_token_with_http_info(client_id) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_o_auth2_token_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **client_id** | **String** | | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_delete_trusted_o_auth2_jwt_grant_issuer > admin_delete_trusted_o_auth2_jwt_grant_issuer(id) Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The id of the desired grant begin # Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer api_instance.admin_delete_trusted_o_auth2_jwt_grant_issuer(id) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_trusted_o_auth2_jwt_grant_issuer: #{e}" end ``` #### Using the admin_delete_trusted_o_auth2_jwt_grant_issuer_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id) ```ruby begin # Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer data, status_code, headers = api_instance.admin_delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_trusted_o_auth2_jwt_grant_issuer_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The id of the desired grant | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_extend_session > admin_extend_session(id) 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. Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID is the session's ID. begin # 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. result = api_instance.admin_extend_session(id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_extend_session: #{e}" end ``` #### Using the admin_extend_session_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_extend_session_with_http_info(id) ```ruby begin # 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. data, status_code, headers = api_instance.admin_extend_session_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_extend_session_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID is the session's ID. | | ### Return type [**Session**](Session.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_get_identity > admin_get_identity(id, opts) Get an Identity Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID must be set to the ID of identity you want to get opts = { include_credential: ['inner_example'] # Array | DeclassifyCredentials will declassify one or more identity's credentials Currently, only `oidc` is supported. This will return the initial OAuth 2.0 Access, Refresh and (optionally) OpenID Connect ID Token. } begin # Get an Identity result = api_instance.admin_get_identity(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_identity: #{e}" end ``` #### Using the admin_get_identity_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_get_identity_with_http_info(id, opts) ```ruby begin # Get an Identity data, status_code, headers = api_instance.admin_get_identity_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_identity_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID must be set to the ID of identity you want to get | | | **include_credential** | [**Array<String>**](String.md) | DeclassifyCredentials will declassify one or more identity's credentials Currently, only `oidc` is supported. This will return the initial OAuth 2.0 Access, Refresh and (optionally) OpenID Connect ID Token. | [optional] | ### Return type [**Identity**](Identity.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_get_json_web_key > admin_get_json_web_key(set, kid) Fetch a JSON Web Key This endpoint returns a singular JSON Web Key. It is identified by the set and the specific key ID (kid). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new set = 'set_example' # String | The JSON Web Key Set kid = 'kid_example' # String | The JSON Web Key ID (kid) begin # Fetch a JSON Web Key result = api_instance.admin_get_json_web_key(set, kid) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_json_web_key: #{e}" end ``` #### Using the admin_get_json_web_key_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_get_json_web_key_with_http_info(set, kid) ```ruby begin # Fetch a JSON Web Key data, status_code, headers = api_instance.admin_get_json_web_key_with_http_info(set, kid) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_json_web_key_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **set** | **String** | The JSON Web Key Set | | | **kid** | **String** | The JSON Web Key ID (kid) | | ### Return type [**JsonWebKeySet**](JsonWebKeySet.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_get_json_web_key_set > admin_get_json_web_key_set(set) 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new set = 'set_example' # String | The JSON Web Key Set begin # Retrieve a JSON Web Key Set result = api_instance.admin_get_json_web_key_set(set) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_json_web_key_set: #{e}" end ``` #### Using the admin_get_json_web_key_set_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_get_json_web_key_set_with_http_info(set) ```ruby begin # Retrieve a JSON Web Key Set data, status_code, headers = api_instance.admin_get_json_web_key_set_with_http_info(set) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_json_web_key_set_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **set** | **String** | The JSON Web Key Set | | ### Return type [**JsonWebKeySet**](JsonWebKeySet.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_get_o_auth2_client > admin_get_o_auth2_client(id) Get an OAuth 2.0 Client Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The id of the OAuth 2.0 Client. begin # Get an OAuth 2.0 Client result = api_instance.admin_get_o_auth2_client(id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_o_auth2_client: #{e}" end ``` #### Using the admin_get_o_auth2_client_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_get_o_auth2_client_with_http_info(id) ```ruby begin # Get an OAuth 2.0 Client data, status_code, headers = api_instance.admin_get_o_auth2_client_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_o_auth2_client_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The id of the OAuth 2.0 Client. | | ### Return type [**OAuth2Client**](OAuth2Client.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_get_o_auth2_consent_request > admin_get_o_auth2_consent_request(consent_challenge) Get OAuth 2.0 Consent Request Information When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new consent_challenge = 'consent_challenge_example' # String | begin # Get OAuth 2.0 Consent Request Information result = api_instance.admin_get_o_auth2_consent_request(consent_challenge) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_o_auth2_consent_request: #{e}" end ``` #### Using the admin_get_o_auth2_consent_request_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_get_o_auth2_consent_request_with_http_info(consent_challenge) ```ruby begin # Get OAuth 2.0 Consent Request Information data, status_code, headers = api_instance.admin_get_o_auth2_consent_request_with_http_info(consent_challenge) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_o_auth2_consent_request_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **consent_challenge** | **String** | | | ### Return type [**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_get_o_auth2_login_request > admin_get_o_auth2_login_request(login_challenge) Get an OAuth 2.0 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new login_challenge = 'login_challenge_example' # String | begin # Get an OAuth 2.0 Login Request result = api_instance.admin_get_o_auth2_login_request(login_challenge) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_o_auth2_login_request: #{e}" end ``` #### Using the admin_get_o_auth2_login_request_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_get_o_auth2_login_request_with_http_info(login_challenge) ```ruby begin # Get an OAuth 2.0 Login Request data, status_code, headers = api_instance.admin_get_o_auth2_login_request_with_http_info(login_challenge) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_o_auth2_login_request_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **login_challenge** | **String** | | | ### Return type [**OAuth2LoginRequest**](OAuth2LoginRequest.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_get_o_auth2_logout_request > admin_get_o_auth2_logout_request(logout_challenge) Get an OAuth 2.0 Logout Request Use this endpoint to fetch a logout request. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new logout_challenge = 'logout_challenge_example' # String | begin # Get an OAuth 2.0 Logout Request result = api_instance.admin_get_o_auth2_logout_request(logout_challenge) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_o_auth2_logout_request: #{e}" end ``` #### Using the admin_get_o_auth2_logout_request_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_get_o_auth2_logout_request_with_http_info(logout_challenge) ```ruby begin # Get an OAuth 2.0 Logout Request data, status_code, headers = api_instance.admin_get_o_auth2_logout_request_with_http_info(logout_challenge) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_o_auth2_logout_request_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **logout_challenge** | **String** | | | ### Return type [**OAuth2LogoutRequest**](OAuth2LogoutRequest.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_get_trusted_o_auth2_jwt_grant_issuer > admin_get_trusted_o_auth2_jwt_grant_issuer(id) Get a Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The id of the desired grant begin # Get a Trusted OAuth2 JWT Bearer Grant Type Issuer result = api_instance.admin_get_trusted_o_auth2_jwt_grant_issuer(id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_trusted_o_auth2_jwt_grant_issuer: #{e}" end ``` #### Using the admin_get_trusted_o_auth2_jwt_grant_issuer_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id) ```ruby begin # Get a Trusted OAuth2 JWT Bearer Grant Type Issuer data, status_code, headers = api_instance.admin_get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_trusted_o_auth2_jwt_grant_issuer_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The id of the desired grant | | ### Return type [**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_introspect_o_auth2_token > admin_introspect_o_auth2_token(token, opts) Introspect OAuth2 Access or Refresh 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](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new token = 'token_example' # String | The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. opts = { scope: 'scope_example' # String | 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. } begin # Introspect OAuth2 Access or Refresh Tokens result = api_instance.admin_introspect_o_auth2_token(token, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_introspect_o_auth2_token: #{e}" end ``` #### Using the admin_introspect_o_auth2_token_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_introspect_o_auth2_token_with_http_info(token, opts) ```ruby begin # Introspect OAuth2 Access or Refresh Tokens data, status_code, headers = api_instance.admin_introspect_o_auth2_token_with_http_info(token, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_introspect_o_auth2_token_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **token** | **String** | The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. | | | **scope** | **String** | 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. | [optional] | ### Return type [**IntrospectedOAuth2Token**](IntrospectedOAuth2Token.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json ## admin_list_courier_messages > > admin_list_courier_messages(opts) List Messages Lists all messages by given status and recipient. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { per_page: 789, # Integer | Items per Page This is the number of items per page. page: 789, # Integer | Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. status: OryClient::CourierMessageStatus::QUEUED, # CourierMessageStatus | Status filters out messages based on status. If no value is provided, it doesn't take effect on filter. recipient: 'recipient_example' # String | Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter. } begin # List Messages result = api_instance.admin_list_courier_messages(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_courier_messages: #{e}" end ``` #### Using the admin_list_courier_messages_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> admin_list_courier_messages_with_http_info(opts) ```ruby begin # List Messages data, status_code, headers = api_instance.admin_list_courier_messages_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => > rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_courier_messages_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **per_page** | **Integer** | Items per Page This is the number of items per page. | [optional][default to 250] | | **page** | **Integer** | Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. | [optional][default to 1] | | **status** | [**CourierMessageStatus**](.md) | Status filters out messages based on status. If no value is provided, it doesn't take effect on filter. | [optional] | | **recipient** | **String** | Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter. | [optional] | ### Return type [**Array<Message>**](Message.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_list_identities > > admin_list_identities(opts) List Identities Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { per_page: 789, # Integer | Items per Page This is the number of items per page. page: 789 # Integer | Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. } begin # List Identities result = api_instance.admin_list_identities(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_identities: #{e}" end ``` #### Using the admin_list_identities_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> admin_list_identities_with_http_info(opts) ```ruby begin # List Identities data, status_code, headers = api_instance.admin_list_identities_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => > rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_identities_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **per_page** | **Integer** | Items per Page This is the number of items per page. | [optional][default to 250] | | **page** | **Integer** | Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. | [optional][default to 1] | ### Return type [**Array<Identity>**](Identity.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_list_identity_sessions > > admin_list_identity_sessions(id, opts) This endpoint returns all sessions that belong to the given Identity. This endpoint is useful for: Listing all sessions that belong to an Identity in an administrative context. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID is the identity's ID. opts = { per_page: 789, # Integer | Items per Page This is the number of items per page. page: 789, # Integer | Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. active: true # Boolean | Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. } begin # This endpoint returns all sessions that belong to the given Identity. result = api_instance.admin_list_identity_sessions(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_identity_sessions: #{e}" end ``` #### Using the admin_list_identity_sessions_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> admin_list_identity_sessions_with_http_info(id, opts) ```ruby begin # This endpoint returns all sessions that belong to the given Identity. data, status_code, headers = api_instance.admin_list_identity_sessions_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => > rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_identity_sessions_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID is the identity's ID. | | | **per_page** | **Integer** | Items per Page This is the number of items per page. | [optional][default to 250] | | **page** | **Integer** | Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. | [optional][default to 1] | | **active** | **Boolean** | Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. | [optional] | ### Return type [**Array<Session>**](Session.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_list_o_auth2_clients > > admin_list_o_auth2_clients(opts) 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { page_size: 789, # Integer | Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). page_token: 'page_token_example', # String | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). client_name: 'client_name_example', # String | The name of the clients to filter by. owner: 'owner_example' # String | The owner of the clients to filter by. } begin # List OAuth 2.0 Clients result = api_instance.admin_list_o_auth2_clients(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_o_auth2_clients: #{e}" end ``` #### Using the admin_list_o_auth2_clients_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> admin_list_o_auth2_clients_with_http_info(opts) ```ruby begin # List OAuth 2.0 Clients data, status_code, headers = api_instance.admin_list_o_auth2_clients_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => > rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_o_auth2_clients_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **page_size** | **Integer** | Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional][default to 250] | | **page_token** | **String** | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional][default to '1'] | | **client_name** | **String** | The name of the clients to filter by. | [optional] | | **owner** | **String** | The owner of the clients to filter by. | [optional] | ### Return type [**Array<OAuth2Client>**](OAuth2Client.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_list_o_auth2_subject_consent_sessions > > admin_list_o_auth2_subject_consent_sessions(subject, opts) List OAuth 2.0 Consent Sessions of a Subject This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new subject = 'subject_example' # String | The subject to list the consent sessions for. opts = { link: 'link_example', # String | The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). x_total_count: 'x_total_count_example' # String | The total number of clients. } begin # List OAuth 2.0 Consent Sessions of a Subject result = api_instance.admin_list_o_auth2_subject_consent_sessions(subject, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_o_auth2_subject_consent_sessions: #{e}" end ``` #### Using the admin_list_o_auth2_subject_consent_sessions_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> admin_list_o_auth2_subject_consent_sessions_with_http_info(subject, opts) ```ruby begin # List OAuth 2.0 Consent Sessions of a Subject data, status_code, headers = api_instance.admin_list_o_auth2_subject_consent_sessions_with_http_info(subject, opts) p status_code # => 2xx p headers # => { ... } p data # => > rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_o_auth2_subject_consent_sessions_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **subject** | **String** | The subject to list the consent sessions for. | | | **link** | **String** | The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] | | **x_total_count** | **String** | The total number of clients. | [optional] | ### Return type [**Array<PreviousOAuth2ConsentSession>**](PreviousOAuth2ConsentSession.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_list_trusted_o_auth2_jwt_grant_issuers > > admin_list_trusted_o_auth2_jwt_grant_issuers(opts) List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { max_items: 789, # Integer | default_items: 789, # Integer | issuer: 'issuer_example', # String | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. limit: 789, # Integer | The maximum amount of policies returned, upper bound is 500 policies offset: 789 # Integer | The offset from where to start looking. } begin # List Trusted OAuth2 JWT Bearer Grant Type Issuers result = api_instance.admin_list_trusted_o_auth2_jwt_grant_issuers(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_trusted_o_auth2_jwt_grant_issuers: #{e}" end ``` #### Using the admin_list_trusted_o_auth2_jwt_grant_issuers_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> admin_list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts) ```ruby begin # List Trusted OAuth2 JWT Bearer Grant Type Issuers data, status_code, headers = api_instance.admin_list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => > rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_trusted_o_auth2_jwt_grant_issuers_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **max_items** | **Integer** | | [optional] | | **default_items** | **Integer** | | [optional] | | **issuer** | **String** | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] | | **limit** | **Integer** | The maximum amount of policies returned, upper bound is 500 policies | [optional] | | **offset** | **Integer** | The offset from where to start looking. | [optional] | ### Return type [**Array<TrustedOAuth2JwtGrantIssuer>**](TrustedOAuth2JwtGrantIssuer.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_patch_identity > admin_patch_identity(id, opts) Patch an Identity Partially updates an Identity's field using [JSON Patch](https://jsonpatch.com/) NOTE: The fields `id`, `stateChangedAt` and `credentials` are not updateable. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID must be set to the ID of identity you want to update opts = { json_patch: [OryClient::JsonPatch.new({op: 'add', path: '/services/identity/config/smtp/from_name'})] # Array | } begin # Patch an Identity result = api_instance.admin_patch_identity(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_patch_identity: #{e}" end ``` #### Using the admin_patch_identity_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_patch_identity_with_http_info(id, opts) ```ruby begin # Patch an Identity data, status_code, headers = api_instance.admin_patch_identity_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_patch_identity_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID must be set to the ID of identity you want to update | | | **json_patch** | [**Array<JsonPatch>**](JsonPatch.md) | | [optional] | ### Return type [**Identity**](Identity.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_patch_o_auth2_client > admin_patch_o_auth2_client(id, json_patch) 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The id of the OAuth 2.0 Client. json_patch = [OryClient::JsonPatch.new({op: 'add', path: '/services/identity/config/smtp/from_name'})] # Array | begin # Patch an OAuth 2.0 Client result = api_instance.admin_patch_o_auth2_client(id, json_patch) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_patch_o_auth2_client: #{e}" end ``` #### Using the admin_patch_o_auth2_client_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_patch_o_auth2_client_with_http_info(id, json_patch) ```ruby begin # Patch an OAuth 2.0 Client data, status_code, headers = api_instance.admin_patch_o_auth2_client_with_http_info(id, json_patch) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_patch_o_auth2_client_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The id of the OAuth 2.0 Client. | | | **json_patch** | [**Array<JsonPatch>**](JsonPatch.md) | | | ### Return type [**OAuth2Client**](OAuth2Client.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_reject_o_auth2_consent_request > admin_reject_o_auth2_consent_request(consent_challenge, opts) Reject an OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new consent_challenge = 'consent_challenge_example' # String | opts = { reject_o_auth2_request: OryClient::RejectOAuth2Request.new # RejectOAuth2Request | } begin # Reject an OAuth 2.0 Consent Request result = api_instance.admin_reject_o_auth2_consent_request(consent_challenge, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_reject_o_auth2_consent_request: #{e}" end ``` #### Using the admin_reject_o_auth2_consent_request_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_reject_o_auth2_consent_request_with_http_info(consent_challenge, opts) ```ruby begin # Reject an OAuth 2.0 Consent Request data, status_code, headers = api_instance.admin_reject_o_auth2_consent_request_with_http_info(consent_challenge, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_reject_o_auth2_consent_request_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **consent_challenge** | **String** | | | | **reject_o_auth2_request** | [**RejectOAuth2Request**](RejectOAuth2Request.md) | | [optional] | ### Return type [**SuccessfulOAuth2RequestResponse**](SuccessfulOAuth2RequestResponse.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_reject_o_auth2_login_request > admin_reject_o_auth2_login_request(login_challenge, opts) Reject an OAuth 2.0 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 denied. The response contains a redirect URL which the login provider should redirect the user-agent to. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new login_challenge = 'login_challenge_example' # String | opts = { reject_o_auth2_request: OryClient::RejectOAuth2Request.new # RejectOAuth2Request | } begin # Reject an OAuth 2.0 Login Request result = api_instance.admin_reject_o_auth2_login_request(login_challenge, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_reject_o_auth2_login_request: #{e}" end ``` #### Using the admin_reject_o_auth2_login_request_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_reject_o_auth2_login_request_with_http_info(login_challenge, opts) ```ruby begin # Reject an OAuth 2.0 Login Request data, status_code, headers = api_instance.admin_reject_o_auth2_login_request_with_http_info(login_challenge, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_reject_o_auth2_login_request_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **login_challenge** | **String** | | | | **reject_o_auth2_request** | [**RejectOAuth2Request**](RejectOAuth2Request.md) | | [optional] | ### Return type [**SuccessfulOAuth2RequestResponse**](SuccessfulOAuth2RequestResponse.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_reject_o_auth2_logout_request > admin_reject_o_auth2_logout_request(logout_challenge, opts) Reject an OAuth 2.0 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new logout_challenge = 'logout_challenge_example' # String | opts = { reject_o_auth2_request: OryClient::RejectOAuth2Request.new # RejectOAuth2Request | } begin # Reject an OAuth 2.0 Logout Request api_instance.admin_reject_o_auth2_logout_request(logout_challenge, opts) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_reject_o_auth2_logout_request: #{e}" end ``` #### Using the admin_reject_o_auth2_logout_request_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_reject_o_auth2_logout_request_with_http_info(logout_challenge, opts) ```ruby begin # Reject an OAuth 2.0 Logout Request data, status_code, headers = api_instance.admin_reject_o_auth2_logout_request_with_http_info(logout_challenge, opts) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_reject_o_auth2_logout_request_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **logout_challenge** | **String** | | | | **reject_o_auth2_request** | [**RejectOAuth2Request**](RejectOAuth2Request.md) | | [optional] | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json ## admin_revoke_o_auth2_consent_sessions > admin_revoke_o_auth2_consent_sessions(subject, opts) Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new subject = 'subject_example' # String | The subject (Subject) whose consent sessions should be deleted. opts = { client: 'client_example', # String | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID all: true # Boolean | If set to `true` deletes all consent sessions by the Subject that have been granted. } begin # Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client api_instance.admin_revoke_o_auth2_consent_sessions(subject, opts) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_revoke_o_auth2_consent_sessions: #{e}" end ``` #### Using the admin_revoke_o_auth2_consent_sessions_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_revoke_o_auth2_consent_sessions_with_http_info(subject, opts) ```ruby begin # Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client data, status_code, headers = api_instance.admin_revoke_o_auth2_consent_sessions_with_http_info(subject, opts) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_revoke_o_auth2_consent_sessions_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **subject** | **String** | The subject (Subject) whose consent sessions should be deleted. | | | **client** | **String** | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID | [optional] | | **all** | **Boolean** | If set to `true` deletes all consent sessions by the Subject that have been granted. | [optional] | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_revoke_o_auth2_login_sessions > admin_revoke_o_auth2_login_sessions(subject) Invalidates All OAuth 2.0 Login Sessions of a Certain User 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new subject = 'subject_example' # String | The subject to revoke authentication sessions for. begin # Invalidates All OAuth 2.0 Login Sessions of a Certain User api_instance.admin_revoke_o_auth2_login_sessions(subject) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_revoke_o_auth2_login_sessions: #{e}" end ``` #### Using the admin_revoke_o_auth2_login_sessions_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_revoke_o_auth2_login_sessions_with_http_info(subject) ```ruby begin # Invalidates All OAuth 2.0 Login Sessions of a Certain User data, status_code, headers = api_instance.admin_revoke_o_auth2_login_sessions_with_http_info(subject) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_revoke_o_auth2_login_sessions_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **subject** | **String** | The subject to revoke authentication sessions for. | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_trust_o_auth2_jwt_grant_issuer > admin_trust_o_auth2_jwt_grant_issuer(opts) Trust an OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { admin_trust_o_auth2_jwt_grant_issuer_body: OryClient::AdminTrustOAuth2JwtGrantIssuerBody.new({expires_at: Time.now, issuer: 'https://jwt-idp.example.com', jwk: OryClient::JsonWebKey.new({alg: 'RS256', kid: '1603dfe0af8f4596', kty: 'RSA', use: 'sig'}), scope: ["openid", "offline"]}) # AdminTrustOAuth2JwtGrantIssuerBody | } begin # Trust an OAuth2 JWT Bearer Grant Type Issuer result = api_instance.admin_trust_o_auth2_jwt_grant_issuer(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_trust_o_auth2_jwt_grant_issuer: #{e}" end ``` #### Using the admin_trust_o_auth2_jwt_grant_issuer_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_trust_o_auth2_jwt_grant_issuer_with_http_info(opts) ```ruby begin # Trust an OAuth2 JWT Bearer Grant Type Issuer data, status_code, headers = api_instance.admin_trust_o_auth2_jwt_grant_issuer_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_trust_o_auth2_jwt_grant_issuer_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **admin_trust_o_auth2_jwt_grant_issuer_body** | [**AdminTrustOAuth2JwtGrantIssuerBody**](AdminTrustOAuth2JwtGrantIssuerBody.md) | | [optional] | ### Return type [**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_update_identity > admin_update_identity(id, opts) Update an Identity This endpoint updates an identity. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID must be set to the ID of identity you want to update opts = { admin_update_identity_body: OryClient::AdminUpdateIdentityBody.new({schema_id: 'schema_id_example', state: OryClient::IdentityState::ACTIVE, traits: 3.56}) # AdminUpdateIdentityBody | } begin # Update an Identity result = api_instance.admin_update_identity(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_update_identity: #{e}" end ``` #### Using the admin_update_identity_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_update_identity_with_http_info(id, opts) ```ruby begin # Update an Identity data, status_code, headers = api_instance.admin_update_identity_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_update_identity_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID must be set to the ID of identity you want to update | | | **admin_update_identity_body** | [**AdminUpdateIdentityBody**](AdminUpdateIdentityBody.md) | | [optional] | ### Return type [**Identity**](Identity.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_update_json_web_key > admin_update_json_web_key(set, kid, opts) 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new set = 'set_example' # String | The JSON Web Key Set kid = 'kid_example' # String | The JSON Web Key ID (kid) opts = { json_web_key: OryClient::JsonWebKey.new({alg: 'RS256', kid: '1603dfe0af8f4596', kty: 'RSA', use: 'sig'}) # JsonWebKey | } begin # Update a JSON Web Key result = api_instance.admin_update_json_web_key(set, kid, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_update_json_web_key: #{e}" end ``` #### Using the admin_update_json_web_key_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_update_json_web_key_with_http_info(set, kid, opts) ```ruby begin # Update a JSON Web Key data, status_code, headers = api_instance.admin_update_json_web_key_with_http_info(set, kid, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_update_json_web_key_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **set** | **String** | The JSON Web Key Set | | | **kid** | **String** | The JSON Web Key ID (kid) | | | **json_web_key** | [**JsonWebKey**](JsonWebKey.md) | | [optional] | ### Return type [**JsonWebKey**](JsonWebKey.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_update_json_web_key_set > admin_update_json_web_key_set(set, opts) 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new set = 'set_example' # String | The JSON Web Key Set opts = { json_web_key_set: OryClient::JsonWebKeySet.new # JsonWebKeySet | } begin # Update a JSON Web Key Set result = api_instance.admin_update_json_web_key_set(set, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_update_json_web_key_set: #{e}" end ``` #### Using the admin_update_json_web_key_set_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_update_json_web_key_set_with_http_info(set, opts) ```ruby begin # Update a JSON Web Key Set data, status_code, headers = api_instance.admin_update_json_web_key_set_with_http_info(set, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_update_json_web_key_set_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **set** | **String** | The JSON Web Key Set | | | **json_web_key_set** | [**JsonWebKeySet**](JsonWebKeySet.md) | | [optional] | ### Return type [**JsonWebKeySet**](JsonWebKeySet.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_update_o_auth2_client > admin_update_o_auth2_client(id, o_auth2_client) Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The id of the OAuth 2.0 Client. o_auth2_client = OryClient::OAuth2Client.new # OAuth2Client | begin # Update an OAuth 2.0 Client result = api_instance.admin_update_o_auth2_client(id, o_auth2_client) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_update_o_auth2_client: #{e}" end ``` #### Using the admin_update_o_auth2_client_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_update_o_auth2_client_with_http_info(id, o_auth2_client) ```ruby begin # Update an OAuth 2.0 Client data, status_code, headers = api_instance.admin_update_o_auth2_client_with_http_info(id, o_auth2_client) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_update_o_auth2_client_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The id of the OAuth 2.0 Client. | | | **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | | | ### Return type [**OAuth2Client**](OAuth2Client.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## create_project > create_project(opts) Create a Project Creates a new project. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { create_project_body: OryClient::CreateProjectBody.new({name: 'name_example'}) # CreateProjectBody | } begin # Create a Project result = api_instance.create_project(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->create_project: #{e}" end ``` #### Using the create_project_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> create_project_with_http_info(opts) ```ruby begin # Create a Project data, status_code, headers = api_instance.create_project_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->create_project_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **create_project_body** | [**CreateProjectBody**](CreateProjectBody.md) | | [optional] | ### Return type [**Project**](Project.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## create_project_api_key > create_project_api_key(project, opts) Create API Token Create an API token for a project. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new project = 'project_example' # String | The Project ID or Project slug opts = { create_project_api_key_request: OryClient::CreateProjectApiKeyRequest.new({name: 'name_example'}) # CreateProjectApiKeyRequest | } begin # Create API Token result = api_instance.create_project_api_key(project, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->create_project_api_key: #{e}" end ``` #### Using the create_project_api_key_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> create_project_api_key_with_http_info(project, opts) ```ruby begin # Create API Token data, status_code, headers = api_instance.create_project_api_key_with_http_info(project, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->create_project_api_key_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **project** | **String** | The Project ID or Project slug | | | **create_project_api_key_request** | [**CreateProjectApiKeyRequest**](CreateProjectApiKeyRequest.md) | | [optional] | ### Return type [**ProjectApiKey**](ProjectApiKey.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## create_self_service_logout_flow_url_for_browsers > create_self_service_logout_flow_url_for_browsers(opts) Create a Logout URL for Browsers This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies. ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new opts = { cookie: 'cookie_example' # String | HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. } begin # Create a Logout URL for Browsers result = api_instance.create_self_service_logout_flow_url_for_browsers(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->create_self_service_logout_flow_url_for_browsers: #{e}" end ``` #### Using the create_self_service_logout_flow_url_for_browsers_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> create_self_service_logout_flow_url_for_browsers_with_http_info(opts) ```ruby begin # Create a Logout URL for Browsers data, status_code, headers = api_instance.create_self_service_logout_flow_url_for_browsers_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->create_self_service_logout_flow_url_for_browsers_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **cookie** | **String** | HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. | [optional] | ### Return type [**SelfServiceLogoutUrl**](SelfServiceLogoutUrl.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## delete_project_api_key > delete_project_api_key(project, token_id) Delete API Token Deletes an API Token and immediately removes it. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new project = 'project_example' # String | The Project ID or Project slug token_id = 'token_id_example' # String | The Token ID begin # Delete API Token api_instance.delete_project_api_key(project, token_id) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->delete_project_api_key: #{e}" end ``` #### Using the delete_project_api_key_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > delete_project_api_key_with_http_info(project, token_id) ```ruby begin # Delete API Token data, status_code, headers = api_instance.delete_project_api_key_with_http_info(project, token_id) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->delete_project_api_key_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **project** | **String** | The Project ID or Project slug | | | **token_id** | **String** | The Token ID | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## discover_json_web_keys > discover_json_web_keys Discover JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new begin # Discover JSON Web Keys result = api_instance.discover_json_web_keys p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->discover_json_web_keys: #{e}" end ``` #### Using the discover_json_web_keys_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> discover_json_web_keys_with_http_info ```ruby begin # Discover JSON Web Keys data, status_code, headers = api_instance.discover_json_web_keys_with_http_info p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->discover_json_web_keys_with_http_info: #{e}" end ``` ### Parameters This endpoint does not need any parameter. ### Return type [**JsonWebKeySet**](JsonWebKeySet.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## discover_oidc_configuration > discover_oidc_configuration OpenID Connect Discovery The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new begin # OpenID Connect Discovery result = api_instance.discover_oidc_configuration p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->discover_oidc_configuration: #{e}" end ``` #### Using the discover_oidc_configuration_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> discover_oidc_configuration_with_http_info ```ruby begin # OpenID Connect Discovery data, status_code, headers = api_instance.discover_oidc_configuration_with_http_info p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->discover_oidc_configuration_with_http_info: #{e}" end ``` ### Parameters This endpoint does not need any parameter. ### Return type [**OidcConfiguration**](OidcConfiguration.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## dynamic_client_registration_create_o_auth2_client > dynamic_client_registration_create_o_auth2_client(o_auth2_client) Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_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 somewhere safe. ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new o_auth2_client = OryClient::OAuth2Client.new # OAuth2Client | begin # Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol result = api_instance.dynamic_client_registration_create_o_auth2_client(o_auth2_client) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->dynamic_client_registration_create_o_auth2_client: #{e}" end ``` #### Using the dynamic_client_registration_create_o_auth2_client_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> dynamic_client_registration_create_o_auth2_client_with_http_info(o_auth2_client) ```ruby begin # Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol data, status_code, headers = api_instance.dynamic_client_registration_create_o_auth2_client_with_http_info(o_auth2_client) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->dynamic_client_registration_create_o_auth2_client_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | | | ### Return type [**OAuth2Client**](OAuth2Client.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## dynamic_client_registration_delete_o_auth2_client > dynamic_client_registration_delete_o_auth2_client(id) Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: bearer config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The id of the OAuth 2.0 Client. begin # Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol api_instance.dynamic_client_registration_delete_o_auth2_client(id) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->dynamic_client_registration_delete_o_auth2_client: #{e}" end ``` #### Using the dynamic_client_registration_delete_o_auth2_client_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > dynamic_client_registration_delete_o_auth2_client_with_http_info(id) ```ruby begin # Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol data, status_code, headers = api_instance.dynamic_client_registration_delete_o_auth2_client_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->dynamic_client_registration_delete_o_auth2_client_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The id of the OAuth 2.0 Client. | | ### Return type nil (empty response body) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## dynamic_client_registration_get_o_auth2_client > dynamic_client_registration_get_o_auth2_client(id) Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: bearer config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The id of the OAuth 2.0 Client. begin # Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol result = api_instance.dynamic_client_registration_get_o_auth2_client(id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->dynamic_client_registration_get_o_auth2_client: #{e}" end ``` #### Using the dynamic_client_registration_get_o_auth2_client_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> dynamic_client_registration_get_o_auth2_client_with_http_info(id) ```ruby begin # Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol data, status_code, headers = api_instance.dynamic_client_registration_get_o_auth2_client_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->dynamic_client_registration_get_o_auth2_client_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The id of the OAuth 2.0 Client. | | ### Return type [**OAuth2Client**](OAuth2Client.md) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## dynamic_client_registration_update_o_auth2_client > dynamic_client_registration_update_o_auth2_client(id, o_auth2_client) Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. 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. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: bearer config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The id of the OAuth 2.0 Client. o_auth2_client = OryClient::OAuth2Client.new # OAuth2Client | begin # Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol result = api_instance.dynamic_client_registration_update_o_auth2_client(id, o_auth2_client) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->dynamic_client_registration_update_o_auth2_client: #{e}" end ``` #### Using the dynamic_client_registration_update_o_auth2_client_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> dynamic_client_registration_update_o_auth2_client_with_http_info(id, o_auth2_client) ```ruby begin # Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol data, status_code, headers = api_instance.dynamic_client_registration_update_o_auth2_client_with_http_info(id, o_auth2_client) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->dynamic_client_registration_update_o_auth2_client_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The id of the OAuth 2.0 Client. | | | **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | | | ### Return type [**OAuth2Client**](OAuth2Client.md) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## get_identity_schema > Object get_identity_schema(id) Get a JSON Schema ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID must be set to the ID of schema you want to get begin result = api_instance.get_identity_schema(id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_identity_schema: #{e}" end ``` #### Using the get_identity_schema_with_http_info variant This returns an Array which contains the response data, status code and headers. > get_identity_schema_with_http_info(id) ```ruby begin data, status_code, headers = api_instance.get_identity_schema_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => Object rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_identity_schema_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID must be set to the ID of schema you want to get | | ### Return type **Object** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_oidc_user_info > get_oidc_user_info OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure OAuth2 access token for authorization: oauth2 config.access_token = 'YOUR ACCESS TOKEN' end api_instance = OryClient::V0alpha2Api.new begin # OpenID Connect Userinfo result = api_instance.get_oidc_user_info p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_oidc_user_info: #{e}" end ``` #### Using the get_oidc_user_info_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_oidc_user_info_with_http_info ```ruby begin # OpenID Connect Userinfo data, status_code, headers = api_instance.get_oidc_user_info_with_http_info p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_oidc_user_info_with_http_info: #{e}" end ``` ### Parameters This endpoint does not need any parameter. ### Return type [**OidcUserInfo**](OidcUserInfo.md) ### Authorization [oauth2](../README.md#oauth2) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_project > get_project(project_id) Get a Project Get a projects you have access to by its ID. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new project_id = 'project_id_example' # String | Project ID The project's ID. begin # Get a Project result = api_instance.get_project(project_id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_project: #{e}" end ``` #### Using the get_project_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_project_with_http_info(project_id) ```ruby begin # Get a Project data, status_code, headers = api_instance.get_project_with_http_info(project_id) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_project_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **project_id** | **String** | Project ID The project's ID. | | ### Return type [**Project**](Project.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_project_members > > get_project_members(project_id) Get all members associated with this project. This endpoint requires the user to be a member of the project with the role `OWNER` or `DEVELOPER`. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new project_id = 'project_id_example' # String | Project ID The project's ID. begin # Get all members associated with this project. result = api_instance.get_project_members(project_id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_project_members: #{e}" end ``` #### Using the get_project_members_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> get_project_members_with_http_info(project_id) ```ruby begin # Get all members associated with this project. data, status_code, headers = api_instance.get_project_members_with_http_info(project_id) p status_code # => 2xx p headers # => { ... } p data # => > rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_project_members_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **project_id** | **String** | Project ID The project's ID. | | ### Return type [**Array<CloudAccount>**](CloudAccount.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_error > get_self_service_error(id) Get Self-Service Errors This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?id=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | Error is the error's ID begin # Get Self-Service Errors result = api_instance.get_self_service_error(id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_error: #{e}" end ``` #### Using the get_self_service_error_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_error_with_http_info(id) ```ruby begin # Get Self-Service Errors data, status_code, headers = api_instance.get_self_service_error_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_error_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | Error is the error's ID | | ### Return type [**SelfServiceError**](SelfServiceError.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_login_flow > get_self_service_login_flow(id, opts) Get Login Flow This endpoint returns a login flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/login', async function (req, res) { const flow = await client.getSelfServiceLoginFlow(req.header('cookie'), req.query['flow']) res.render('login', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). opts = { cookie: 'cookie_example' # String | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. } begin # Get Login Flow result = api_instance.get_self_service_login_flow(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_login_flow: #{e}" end ``` #### Using the get_self_service_login_flow_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_login_flow_with_http_info(id, opts) ```ruby begin # Get Login Flow data, status_code, headers = api_instance.get_self_service_login_flow_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_login_flow_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). | | | **cookie** | **String** | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. | [optional] | ### Return type [**SelfServiceLoginFlow**](SelfServiceLoginFlow.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_recovery_flow > get_self_service_recovery_flow(id, opts) Get Recovery Flow This endpoint returns a recovery flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getSelfServiceRecoveryFlow(req.header('Cookie'), req.query['flow']) res.render('recovery', flow) }) ``` More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). opts = { cookie: 'cookie_example' # String | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. } begin # Get Recovery Flow result = api_instance.get_self_service_recovery_flow(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_recovery_flow: #{e}" end ``` #### Using the get_self_service_recovery_flow_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_recovery_flow_with_http_info(id, opts) ```ruby begin # Get Recovery Flow data, status_code, headers = api_instance.get_self_service_recovery_flow_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_recovery_flow_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). | | | **cookie** | **String** | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. | [optional] | ### Return type [**SelfServiceRecoveryFlow**](SelfServiceRecoveryFlow.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_registration_flow > get_self_service_registration_flow(id, opts) Get Registration Flow This endpoint returns a registration flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/registration', async function (req, res) { const flow = await client.getSelfServiceRegistrationFlow(req.header('cookie'), req.query['flow']) res.render('registration', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). opts = { cookie: 'cookie_example' # String | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. } begin # Get Registration Flow result = api_instance.get_self_service_registration_flow(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_registration_flow: #{e}" end ``` #### Using the get_self_service_registration_flow_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_registration_flow_with_http_info(id, opts) ```ruby begin # Get Registration Flow data, status_code, headers = api_instance.get_self_service_registration_flow_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_registration_flow_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). | | | **cookie** | **String** | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. | [optional] | ### Return type [**SelfServiceRegistrationFlow**](SelfServiceRegistrationFlow.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_settings_flow > get_self_service_settings_flow(id, opts) Get Settings Flow When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. You can access this endpoint without credentials when using Ory Kratos' Admin API. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). opts = { x_session_token: 'x_session_token_example', # String | The Session Token When using the SDK in an app without a browser, please include the session token here. cookie: 'cookie_example' # String | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. } begin # Get Settings Flow result = api_instance.get_self_service_settings_flow(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_settings_flow: #{e}" end ``` #### Using the get_self_service_settings_flow_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_settings_flow_with_http_info(id, opts) ```ruby begin # Get Settings Flow data, status_code, headers = api_instance.get_self_service_settings_flow_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_settings_flow_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). | | | **x_session_token** | **String** | The Session Token When using the SDK in an app without a browser, please include the session token here. | [optional] | | **cookie** | **String** | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. | [optional] | ### Return type [**SelfServiceSettingsFlow**](SelfServiceSettingsFlow.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_verification_flow > get_self_service_verification_flow(id, opts) Get Verification Flow This endpoint returns a verification flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getSelfServiceVerificationFlow(req.header('cookie'), req.query['flow']) res.render('verification', flow) }) More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). opts = { cookie: 'cookie_example' # String | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. } begin # Get Verification Flow result = api_instance.get_self_service_verification_flow(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_verification_flow: #{e}" end ``` #### Using the get_self_service_verification_flow_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_verification_flow_with_http_info(id, opts) ```ruby begin # Get Verification Flow data, status_code, headers = api_instance.get_self_service_verification_flow_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_verification_flow_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). | | | **cookie** | **String** | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. | [optional] | ### Return type [**SelfServiceVerificationFlow**](SelfServiceVerificationFlow.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_web_authn_java_script > String get_web_authn_java_script Get WebAuthn JavaScript This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html