3.12.8 • Published 2 years ago

ory_hydra v3.12.8

Weekly downloads
7
License
Unlicense
Repository
-
Last release
2 years ago

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

ClassMethodHTTP requestDescription
OryHydra.AdminApiacceptConsentRequestPUT /oauth2/auth/requests/consent/acceptAccept an consent request
OryHydra.AdminApiacceptLoginRequestPUT /oauth2/auth/requests/login/acceptAccept an login request
OryHydra.AdminApiacceptLogoutRequestPUT /oauth2/auth/requests/logout/acceptAccept a logout request
OryHydra.AdminApicreateJsonWebKeySetPOST /keys/{set}Generate a new JSON Web Key
OryHydra.AdminApicreateOAuth2ClientPOST /clientsCreate an OAuth 2.0 client
OryHydra.AdminApideleteJsonWebKeyDELETE /keys/{set}/{kid}Delete a JSON Web Key
OryHydra.AdminApideleteJsonWebKeySetDELETE /keys/{set}Delete a JSON Web Key Set
OryHydra.AdminApideleteOAuth2ClientDELETE /clients/{id}Deletes an OAuth 2.0 Client
OryHydra.AdminApiflushInactiveOAuth2TokensPOST /oauth2/flushFlush Expired OAuth2 Access Tokens
OryHydra.AdminApigetConsentRequestGET /oauth2/auth/requests/consentGet consent request information
OryHydra.AdminApigetJsonWebKeyGET /keys/{set}/{kid}Fetch a JSON Web Key
OryHydra.AdminApigetJsonWebKeySetGET /keys/{set}Retrieve a JSON Web Key Set
OryHydra.AdminApigetLoginRequestGET /oauth2/auth/requests/loginGet an login request
OryHydra.AdminApigetLogoutRequestGET /oauth2/auth/requests/logoutGet a logout request
OryHydra.AdminApigetOAuth2ClientGET /clients/{id}Get an OAuth 2.0 Client.
OryHydra.AdminApiintrospectOAuth2TokenPOST /oauth2/introspectIntrospect OAuth2 tokens
OryHydra.AdminApilistOAuth2ClientsGET /clientsList OAuth 2.0 Clients
OryHydra.AdminApilistSubjectConsentSessionsGET /oauth2/auth/sessions/consentLists all consent sessions of a subject
OryHydra.AdminApirejectConsentRequestPUT /oauth2/auth/requests/consent/rejectReject an consent request
OryHydra.AdminApirejectLoginRequestPUT /oauth2/auth/requests/login/rejectReject a login request
OryHydra.AdminApirejectLogoutRequestPUT /oauth2/auth/requests/logout/rejectReject a logout request
OryHydra.AdminApirevokeAuthenticationSessionDELETE /oauth2/auth/sessions/loginInvalidates all login sessions of a certain user Invalidates a subject's authentication session
OryHydra.AdminApirevokeConsentSessionsDELETE /oauth2/auth/sessions/consentRevokes consent sessions of a subject for a specific OAuth 2.0 Client
OryHydra.AdminApiupdateJsonWebKeyPUT /keys/{set}/{kid}Update a JSON Web Key
OryHydra.AdminApiupdateJsonWebKeySetPUT /keys/{set}Update a JSON Web Key Set
OryHydra.AdminApiupdateOAuth2ClientPUT /clients/{id}Update an OAuth 2.0 Client
OryHydra.HealthApiisInstanceAliveGET /health/aliveCheck alive status
OryHydra.HealthApiisInstanceReadyGET /health/readyCheck readiness status
OryHydra.PublicApidisconnectUserGET /oauth2/sessions/logoutOpenID Connect Front-Backchannel enabled Logout
OryHydra.PublicApidiscoverOpenIDConfigurationGET /.well-known/openid-configurationOpenID Connect Discovery
OryHydra.PublicApioauth2TokenPOST /oauth2/tokenThe OAuth 2.0 token endpoint
OryHydra.PublicApioauthAuthGET /oauth2/authThe OAuth 2.0 authorize endpoint
OryHydra.PublicApirevokeOAuth2TokenPOST /oauth2/revokeRevoke OAuth2 tokens
OryHydra.PublicApiuserinfoGET /userinfoOpenID Connect Userinfo
OryHydra.PublicApiwellKnownGET /.well-known/jwks.jsonJSON Web Keys Discovery
OryHydra.VersionApigetVersionGET /versionGet service version

Documentation for Models

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
3.12.7

2 years ago

3.12.6

2 years ago

3.12.8

2 years ago

3.12.5

2 years ago

3.12.4

2 years ago

3.12.3

2 years ago

3.12.1

2 years ago

3.10.2

2 years ago

3.12.2

2 years ago

3.10.1

2 years ago

3.6.5

3 years ago

3.6.4

3 years ago

3.6.3

3 years ago

3.6.2

3 years ago

3.6.1

3 years ago

3.4.3

3 years ago

3.4.2

3 years ago

3.4.1

3 years ago

3.2.1

3 years ago

3.1.1

3 years ago

2.10.3

3 years ago

2.10.2

3 years ago

2.10.1

4 years ago

2.9.2

4 years ago

2.9.1

4 years ago