scottbass3/hydra-client-php-psr-18

Documentation for all of Ory Hydra's APIs.

Fund package maintenance!
Patreon
Open Collective

Installs: 86

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 10

pkg:composer/scottbass3/hydra-client-php-psr-18

v1.0.0 2025-11-20 10:04 UTC

This package is auto-updated.

Last update: 2025-12-20 10:21:25 UTC


README

Documentation for all of Ory Hydra's APIs.

Installation & Usage

Requirements

PHP 7.2 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Your project is free to choose the http client of your choice Please require packages that will provide http client functionality: https://packagist.org/providers/psr/http-client-implementation https://packagist.org/providers/php-http/async-client-implementation https://packagist.org/providers/psr/http-factory-implementation

As an example:

composer require guzzlehttp/guzzle php-http/guzzle7-adapter http-interop/http-factory-guzzle

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/scottbass3/hydra-client-php-psr-18/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new Scottbass3\Hydra\Client\Api\JwkApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client()
);
$set = 'set_example'; // string | The JSON Web Key Set ID
$createJsonWebKeySet = new \Scottbass3\Hydra\Client\Model\CreateJsonWebKeySet(); // \Scottbass3\Hydra\Client\Model\CreateJsonWebKeySet

try {
    $result = $apiInstance->createJsonWebKeySet($set, $createJsonWebKeySet);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JwkApi->createJsonWebKeySet: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
JwkApi createJsonWebKeySet POST /admin/keys/{set} Create JSON Web Key
JwkApi deleteJsonWebKey DELETE /admin/keys/{set}/{kid} Delete JSON Web Key
JwkApi deleteJsonWebKeySet DELETE /admin/keys/{set} Delete JSON Web Key Set
JwkApi getJsonWebKey GET /admin/keys/{set}/{kid} Get JSON Web Key
JwkApi getJsonWebKeySet GET /admin/keys/{set} Retrieve a JSON Web Key Set
JwkApi setJsonWebKey PUT /admin/keys/{set}/{kid} Set JSON Web Key
JwkApi setJsonWebKeySet PUT /admin/keys/{set} Update a JSON Web Key Set
MetadataApi getVersion GET /version Return Running Software Version.
MetadataApi isAlive GET /health/alive Check HTTP Server Status
MetadataApi isReady GET /health/ready Check HTTP Server and Database Status
OAuth2Api acceptOAuth2ConsentRequest PUT /admin/oauth2/auth/requests/consent/accept Accept OAuth 2.0 Consent Request
OAuth2Api acceptOAuth2LoginRequest PUT /admin/oauth2/auth/requests/login/accept Accept OAuth 2.0 Login Request
OAuth2Api acceptOAuth2LogoutRequest PUT /admin/oauth2/auth/requests/logout/accept Accept OAuth 2.0 Session Logout Request
OAuth2Api acceptUserCodeRequest PUT /admin/oauth2/auth/requests/device/accept Accepts a device grant user_code request
OAuth2Api createOAuth2Client POST /admin/clients Create OAuth 2.0 Client
OAuth2Api deleteOAuth2Client DELETE /admin/clients/{id} Delete OAuth 2.0 Client
OAuth2Api deleteOAuth2Token DELETE /admin/oauth2/tokens Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client
OAuth2Api deleteTrustedOAuth2JwtGrantIssuer DELETE /admin/trust/grants/jwt-bearer/issuers/{id} Delete Trusted OAuth2 JWT Bearer Grant Type Issuer
OAuth2Api getOAuth2Client GET /admin/clients/{id} Get an OAuth 2.0 Client
OAuth2Api getOAuth2ConsentRequest GET /admin/oauth2/auth/requests/consent Get OAuth 2.0 Consent Request
OAuth2Api getOAuth2LoginRequest GET /admin/oauth2/auth/requests/login Get OAuth 2.0 Login Request
OAuth2Api getOAuth2LogoutRequest GET /admin/oauth2/auth/requests/logout Get OAuth 2.0 Session Logout Request
OAuth2Api getTrustedOAuth2JwtGrantIssuer GET /admin/trust/grants/jwt-bearer/issuers/{id} Get Trusted OAuth2 JWT Bearer Grant Type Issuer
OAuth2Api introspectOAuth2Token POST /admin/oauth2/introspect Introspect OAuth2 Access and Refresh Tokens
OAuth2Api listOAuth2Clients GET /admin/clients List OAuth 2.0 Clients
OAuth2Api listOAuth2ConsentSessions GET /admin/oauth2/auth/sessions/consent List OAuth 2.0 Consent Sessions of a Subject
OAuth2Api listTrustedOAuth2JwtGrantIssuers GET /admin/trust/grants/jwt-bearer/issuers List Trusted OAuth2 JWT Bearer Grant Type Issuers
OAuth2Api oAuth2Authorize GET /oauth2/auth OAuth 2.0 Authorize Endpoint
OAuth2Api oAuth2DeviceFlow POST /oauth2/device/auth The OAuth 2.0 Device Authorize Endpoint
OAuth2Api oauth2TokenExchange POST /oauth2/token The OAuth 2.0 Token Endpoint
OAuth2Api patchOAuth2Client PATCH /admin/clients/{id} Patch OAuth 2.0 Client
OAuth2Api performOAuth2DeviceVerificationFlow GET /oauth2/device/verify OAuth 2.0 Device Verification Endpoint
OAuth2Api rejectOAuth2ConsentRequest PUT /admin/oauth2/auth/requests/consent/reject Reject OAuth 2.0 Consent Request
OAuth2Api rejectOAuth2LoginRequest PUT /admin/oauth2/auth/requests/login/reject Reject OAuth 2.0 Login Request
OAuth2Api rejectOAuth2LogoutRequest PUT /admin/oauth2/auth/requests/logout/reject Reject OAuth 2.0 Session Logout Request
OAuth2Api revokeOAuth2ConsentSessions DELETE /admin/oauth2/auth/sessions/consent Revoke OAuth 2.0 Consent Sessions of a Subject
OAuth2Api revokeOAuth2LoginSessions DELETE /admin/oauth2/auth/sessions/login Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID
OAuth2Api revokeOAuth2Token POST /oauth2/revoke Revoke OAuth 2.0 Access or Refresh Token
OAuth2Api setOAuth2Client PUT /admin/clients/{id} Set OAuth 2.0 Client
OAuth2Api setOAuth2ClientLifespans PUT /admin/clients/{id}/lifespans Set OAuth2 Client Token Lifespans
OAuth2Api trustOAuth2JwtGrantIssuer POST /admin/trust/grants/jwt-bearer/issuers Trust OAuth2 JWT Bearer Grant Type Issuer
OidcApi createOidcDynamicClient POST /oauth2/register Register OAuth2 Client using OpenID Dynamic Client Registration
OidcApi createVerifiableCredential POST /credentials Issues a Verifiable Credential
OidcApi deleteOidcDynamicClient DELETE /oauth2/register/{id} Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol
OidcApi discoverOidcConfiguration GET /.well-known/openid-configuration OpenID Connect Discovery
OidcApi getOidcDynamicClient GET /oauth2/register/{id} Get OAuth2 Client using OpenID Dynamic Client Registration
OidcApi getOidcUserInfo GET /userinfo OpenID Connect Userinfo
OidcApi revokeOidcSession GET /oauth2/sessions/logout OpenID Connect Front- and Back-channel Enabled Logout
OidcApi setOidcDynamicClient PUT /oauth2/register/{id} Set OAuth2 Client using OpenID Dynamic Client Registration
WellknownApi discoverJsonWebKeys GET /.well-known/jwks.json Discover Well-Known JSON Web Keys

Models

Authorization

basic

  • Type: HTTP basic authentication

bearer

  • Type: Bearer authentication

oauth2

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

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

hi@ory.sh

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v25.4.0
    • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen