ory_hydra v3.12.8
ory_hydra
OryHydra - JavaScript client for ory_hydra Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. This SDK is automatically generated by the Swagger Codegen project:
- API version: latest
- Package version: latest
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install ory_hydra --save
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your ory_hydra from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('ory_hydra')
in javascript files from the directory you ran the last
command above from.
git
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually
use this library):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var OryHydra = require('ory_hydra');
var api = new OryHydra.AdminApi()
var consentChallenge = "consentChallenge_example"; // {String}
var opts = {
'body': new OryHydra.AcceptConsentRequest() // {AcceptConsentRequest}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.acceptConsentRequest(consentChallenge, opts, callback);
Documentation for API Endpoints
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
OryHydra.AdminApi | acceptConsentRequest | PUT /oauth2/auth/requests/consent/accept | Accept an consent request |
OryHydra.AdminApi | acceptLoginRequest | PUT /oauth2/auth/requests/login/accept | Accept an login request |
OryHydra.AdminApi | acceptLogoutRequest | PUT /oauth2/auth/requests/logout/accept | Accept a logout request |
OryHydra.AdminApi | createJsonWebKeySet | POST /keys/{set} | Generate a new JSON Web Key |
OryHydra.AdminApi | createOAuth2Client | POST /clients | Create an OAuth 2.0 client |
OryHydra.AdminApi | deleteJsonWebKey | DELETE /keys/{set}/{kid} | Delete a JSON Web Key |
OryHydra.AdminApi | deleteJsonWebKeySet | DELETE /keys/{set} | Delete a JSON Web Key Set |
OryHydra.AdminApi | deleteOAuth2Client | DELETE /clients/{id} | Deletes an OAuth 2.0 Client |
OryHydra.AdminApi | flushInactiveOAuth2Tokens | POST /oauth2/flush | Flush Expired OAuth2 Access Tokens |
OryHydra.AdminApi | getConsentRequest | GET /oauth2/auth/requests/consent | Get consent request information |
OryHydra.AdminApi | getJsonWebKey | GET /keys/{set}/{kid} | Fetch a JSON Web Key |
OryHydra.AdminApi | getJsonWebKeySet | GET /keys/{set} | Retrieve a JSON Web Key Set |
OryHydra.AdminApi | getLoginRequest | GET /oauth2/auth/requests/login | Get an login request |
OryHydra.AdminApi | getLogoutRequest | GET /oauth2/auth/requests/logout | Get a logout request |
OryHydra.AdminApi | getOAuth2Client | GET /clients/{id} | Get an OAuth 2.0 Client. |
OryHydra.AdminApi | introspectOAuth2Token | POST /oauth2/introspect | Introspect OAuth2 tokens |
OryHydra.AdminApi | listOAuth2Clients | GET /clients | List OAuth 2.0 Clients |
OryHydra.AdminApi | listSubjectConsentSessions | GET /oauth2/auth/sessions/consent | Lists all consent sessions of a subject |
OryHydra.AdminApi | rejectConsentRequest | PUT /oauth2/auth/requests/consent/reject | Reject an consent request |
OryHydra.AdminApi | rejectLoginRequest | PUT /oauth2/auth/requests/login/reject | Reject a login request |
OryHydra.AdminApi | rejectLogoutRequest | PUT /oauth2/auth/requests/logout/reject | Reject a logout request |
OryHydra.AdminApi | revokeAuthenticationSession | DELETE /oauth2/auth/sessions/login | Invalidates all login sessions of a certain user Invalidates a subject's authentication session |
OryHydra.AdminApi | revokeConsentSessions | DELETE /oauth2/auth/sessions/consent | Revokes consent sessions of a subject for a specific OAuth 2.0 Client |
OryHydra.AdminApi | updateJsonWebKey | PUT /keys/{set}/{kid} | Update a JSON Web Key |
OryHydra.AdminApi | updateJsonWebKeySet | PUT /keys/{set} | Update a JSON Web Key Set |
OryHydra.AdminApi | updateOAuth2Client | PUT /clients/{id} | Update an OAuth 2.0 Client |
OryHydra.HealthApi | isInstanceAlive | GET /health/alive | Check alive status |
OryHydra.HealthApi | isInstanceReady | GET /health/ready | Check readiness status |
OryHydra.PublicApi | disconnectUser | GET /oauth2/sessions/logout | OpenID Connect Front-Backchannel enabled Logout |
OryHydra.PublicApi | discoverOpenIDConfiguration | GET /.well-known/openid-configuration | OpenID Connect Discovery |
OryHydra.PublicApi | oauth2Token | POST /oauth2/token | The OAuth 2.0 token endpoint |
OryHydra.PublicApi | oauthAuth | GET /oauth2/auth | The OAuth 2.0 authorize endpoint |
OryHydra.PublicApi | revokeOAuth2Token | POST /oauth2/revoke | Revoke OAuth2 tokens |
OryHydra.PublicApi | userinfo | GET /userinfo | OpenID Connect Userinfo |
OryHydra.PublicApi | wellKnown | GET /.well-known/jwks.json | JSON Web Keys Discovery |
OryHydra.VersionApi | getVersion | GET /version | Get service version |
Documentation for Models
- OryHydra.AcceptConsentRequest
- OryHydra.AcceptLoginRequest
- OryHydra.CompletedRequest
- OryHydra.ConsentRequest
- OryHydra.ConsentRequestSession
- OryHydra.EmptyResponse
- OryHydra.FlushInactiveOAuth2TokensRequest
- OryHydra.GenericError
- OryHydra.HealthNotReadyStatus
- OryHydra.HealthStatus
- OryHydra.JSONWebKey
- OryHydra.JSONWebKeySet
- OryHydra.JsonWebKeySetGeneratorRequest
- OryHydra.LoginRequest
- OryHydra.LogoutRequest
- OryHydra.OAuth2Client
- OryHydra.OAuth2TokenIntrospection
- OryHydra.Oauth2TokenResponse
- OryHydra.OauthTokenResponse
- OryHydra.OpenIDConnectContext
- OryHydra.PreviousConsentSession
- OryHydra.RejectRequest
- OryHydra.SwaggerFlushInactiveAccessTokens
- OryHydra.SwaggerJsonWebKeyQuery
- OryHydra.SwaggerJwkCreateSet
- OryHydra.SwaggerJwkSetQuery
- OryHydra.SwaggerJwkUpdateSet
- OryHydra.SwaggerJwkUpdateSetKey
- OryHydra.SwaggerOAuthIntrospectionRequest
- OryHydra.SwaggerRevokeOAuth2TokenParameters
- OryHydra.Swaggeroauth2TokenParameters
- OryHydra.UserinfoResponse
- OryHydra.Version
- OryHydra.WellKnown
Documentation for Authorization
basic
- Type: HTTP basic authentication
oauth2
- Type: OAuth
- Flow: accessCode
- Authorization URL: /oauth2/auth
- Scopes:
- offline: A scope required when requesting refresh tokens
- openid: Request an OpenID Connect ID Token
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago