@ory/hydra-client-fetch
v26.2.0
Published
OpenAPI client for @ory/hydra-client-fetch
Downloads
5,708
Readme
@ory/[email protected]
A TypeScript SDK client for the localhost API.
Usage
First, install the SDK from npm.
npm install @ory/hydra-client-fetch --saveNext, try it out.
import {
Configuration,
JwkApi,
} from '@ory/hydra-client-fetch';
import type { CreateJsonWebKeySetRequest } from '@ory/hydra-client-fetch';
async function example() {
console.log("🚀 Testing @ory/hydra-client-fetch SDK...");
const api = new JwkApi();
const body = {
// string | The JSON Web Key Set ID
set: set_example,
// CreateJsonWebKeySet
createJsonWebKeySet: ...,
} satisfies CreateJsonWebKeySetRequest;
try {
const data = await api.createJsonWebKeySet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);Documentation
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
- AcceptDeviceUserCodeRequest
- AcceptOAuth2ConsentRequest
- AcceptOAuth2ConsentRequestSession
- AcceptOAuth2LoginRequest
- CreateJsonWebKeySet
- CreateVerifiableCredentialRequestBody
- CredentialSupportedDraft00
- DeviceAuthorization
- DeviceUserAuthRequest
- ErrorOAuth2
- GenericError
- GetVersion200Response
- HealthNotReadyStatus
- HealthStatus
- IntrospectedOAuth2Token
- IsReady200Response
- IsReady503Response
- JsonPatch
- JsonWebKey
- JsonWebKeySet
- KeysetPaginationRequestParameters
- KeysetPaginationResponseHeaders
- OAuth2Client
- OAuth2ClientTokenLifespans
- OAuth2ConsentRequest
- OAuth2ConsentRequestOpenIDConnectContext
- OAuth2ConsentSession
- OAuth2LoginRequest
- OAuth2LogoutRequest
- OAuth2RedirectTo
- OAuth2TokenExchange
- OidcConfiguration
- OidcUserInfo
- RFC6749ErrorJson
- RejectOAuth2Request
- TokenPagination
- TokenPaginationHeaders
- TokenPaginationRequestParameters
- TokenPaginationResponseHeaders
- TrustOAuth2JwtGrantIssuer
- TrustedOAuth2JwtGrantIssuer
- TrustedOAuth2JwtGrantJsonWebKey
- VerifiableCredentialPrimingResponse
- VerifiableCredentialProof
- VerifiableCredentialResponse
- VerifyUserCodeRequest
- Version
Authorization
Authentication schemes defined for the API:
basic
- Type: HTTP basic authentication
bearer
- Type: HTTP Bearer Token authentication
oauth2 accessCode
- 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 tokensopenid: Request an OpenID Connect ID Token
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
v26.2.0 - Package version:
v26.2.0 - Generator version:
7.17.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildPublishing
Once you've built the package, you can publish it to npm:
npm publish