1.1.0-rc.15 • Published 6 months ago

kanidm v1.1.0-rc.15

Weekly downloads
-
License
MPL-2.0
Repository
-
Last release
6 months ago

kanidm

Kanidm - JavaScript client for kanidm API for interacting with the Kanidm system. This is a work in progress This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.1.0-rc.15-dev
  • Package version: 1.1.0-rc.15-dev
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://github.com/kanidm/kanidm

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 kanidm --save

Finally, you need to build the module:

npm run build
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

To use the link you just defined in your project, switch to the directory you want to use your kanidm from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

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):

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 Kanidm = require('kanidm');

var defaultClient = Kanidm.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: token_jwt
var token_jwt = defaultClient.authentications['token_jwt'];
token_jwt.accessToken = "YOUR ACCESS TOKEN"

var api = new Kanidm.ScimApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.scimSyncGet(callback);

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
Kanidm.ScimApiscimSyncGetGET /scim/v1/Sync
Kanidm.ScimApiscimSyncPostPOST /scim/v1/Sync
Kanidm.SystemApistatusGET /statusStatus endpoint used for health checks, returns true when the server is up.
Kanidm.UiApioauth2ImageGetGET /ui/images/oauth2/{rs_name}This returns the image for the OAuth2 Resource Server if the user has permissions
Kanidm.UiApirobotsTxtGET /robots.txt
Kanidm.V1AccountApiaccountIdRadiusTokenGetGET /v1/account/{id}/_radius/_token
Kanidm.V1AccountApiaccountIdSshPubkeysGetGET /v1/account/{id}/_ssh_pubkeys
Kanidm.V1AccountApiaccountIdSshPubkeysTagGetGET /v1/account/{id}/_ssh_pubkeys/{tag}
Kanidm.V1AccountApiaccountIdUnixAuthPostPOST /v1/account/{id}/_unix/_auth
Kanidm.V1AccountApiaccountIdUnixPostPOST /v1/account/{id}/_unixExpects an `AccountUnixExtend` object
Kanidm.V1AccountApiaccountIdUnixTokenPOST /v1/account/{id}/_unix/_token
Kanidm.V1AccountApiaccountIdUserAuthTokenGetGET /v1/account/{id}/_user_auth_token
Kanidm.V1AccountApiaccountUserAuthTokenDeleteGET /v1/account/{id}/_user_auth_token/{token_id}
Kanidm.V1AuthApiauthPOST /v1/auth
Kanidm.V1AuthApiauthValidGET /v1/auth/valid
Kanidm.V1AuthApilogoutPOST /v1/logout
Kanidm.V1AuthApireauthPOST /v1/reauth
Kanidm.V1CredentialApicredentialUpdateCancelPOST /v1/credential/_cancel
Kanidm.V1CredentialApicredentialUpdateCommitPOST /v1/credential/_commit
Kanidm.V1CredentialApicredentialUpdateExchangeIntentGET /v1/credential/_exchange_intent
Kanidm.V1CredentialApicredentialUpdateStatusGET /v1/credential/_status
Kanidm.V1CredentialApicredentialUpdateUpdatePOST /v1/credential/_update
Kanidm.V1DebugApidebugIpinfoGET /v1/debug/ipinfo
Kanidm.V1DomainApidomainAttrDeleteDELETE /v1/domain/_attr/{attr}
Kanidm.V1DomainApidomainAttrGetGET /v1/domain/_attr/{attr}
Kanidm.V1DomainApidomainAttrPutPUT /v1/domain/_attr/{attr}
Kanidm.V1DomainApidomainGetGET /v1/domain
Kanidm.V1GroupApigroupGetGET /v1/groupReturns all groups visible to the user
Kanidm.V1GroupApigroupIdDeleteDELETE /v1/group/{id}
Kanidm.V1GroupApigroupIdGetGET /v1/group/{id}
Kanidm.V1GroupApigroupPostPOST /v1/group/{id}
Kanidm.V1GroupAttrApigroupIdAttrDeleteDELETE /v1/group/{id}/_attr/{attr}
Kanidm.V1GroupAttrApigroupIdAttrGetGET /v1/group/{id}/_attr/{attr}
Kanidm.V1GroupAttrApigroupIdAttrPostPOST /v1/group/{id}/_attr/{attr}
Kanidm.V1GroupAttrApigroupIdAttrPutPUT /v1/group/{id}/_attr/{attr}
Kanidm.V1GroupUnixApigroupIdUnixPostPUT /v1/group/{id}/_unix
Kanidm.V1GroupUnixApigroupIdUnixTokenGetGET /v1/group/{id}/_unix/_token
Kanidm.V1Oauth2Apioauth2BasicPostPOST /v1/oauth2/basic
Kanidm.V1Oauth2Apioauth2GetGET /v1/oauth2Lists all the OAuth2 Resource Servers
Kanidm.V1Oauth2Apioauth2IdDeleteDELETE /v1/oauth2/{rs_name}Delete an OAuth2 Resource Server
Kanidm.V1Oauth2Apioauth2IdGetGET /v1/oauth2/{rs_name}Get the details of a given OAuth2 Resource Server.
Kanidm.V1Oauth2Apioauth2IdGetBasicSecretGET /v1/oauth2/{rs_name}/_basic_secretGet the basic secret for a given OAuth2 Resource Server. This is used for authentication.
Kanidm.V1Oauth2Apioauth2IdImageDeleteDELETE /v1/oauth2/{rs_name}/_image
Kanidm.V1Oauth2Apioauth2IdImagePostPOST /v1/oauth2/{rs_name}/_imageAPI endpoint for creating/replacing the image associated with an OAuth2 Resource Server.
Kanidm.V1Oauth2Apioauth2IdPatchPATCH /v1/oauth2/{rs_name}Modify an OAuth2 Resource Server
Kanidm.V1Oauth2Apioauth2IdScopemapDeleteDELETE /v1/oauth2/{rs_name}/_scopemap/{group}
Kanidm.V1Oauth2Apioauth2IdScopemapPostPATCH /v1/oauth2/{rs_name}/_scopemap/{group}Modify the scope map for a given OAuth2 Resource Server
Kanidm.V1Oauth2Apioauth2IdSupScopemapDeleteDELETE /v1/oauth2/{rs_name}/_sup_scopemap/{group}
Kanidm.V1Oauth2Apioauth2IdSupScopemapPostPOST /v1/oauth2/{rs_name}/_sup_scopemap/{group}Create a supplemental scope map for a given OAuth2 Resource Server
Kanidm.V1Oauth2Apioauth2PublicPostPOST /v1/oauth2/_public
Kanidm.V1PersonApiaccountIdRadiusTokenPostPOST /v1/account/{id}/_radius/_token
Kanidm.V1PersonApipersonGetGET /v1/person
Kanidm.V1PersonApipersonIdCredentialUpdateIntentGetGET /v1/person/{id}/_credential/_update_intent
Kanidm.V1PersonApipersonIdDeleteDELETE /v1/person/{id}
Kanidm.V1PersonApipersonIdGetGET /v1/person/{id}
Kanidm.V1PersonApipersonIdPatchPATCH /v1/person/{id}
Kanidm.V1PersonApipersonIdRadiusDeleteDELETE /v1/person/{id}/_radius
Kanidm.V1PersonApipersonIdentifyUserPostPOST /v1/person/{id}/_identify/_user
Kanidm.V1PersonApipersonPostPOST /v1/personExpects the following fields in the attrs field of the req: name, displayname
Kanidm.V1PersonApiserviceAccountIdSshPubkeysTagDeleteDELETE /v1/service_account/{id}/_ssh_pubkeys/{tag}
Kanidm.V1PersonAttrApipersonIdDeleteAttrDELETE /v1/person/{id}/_attr/{attr}
Kanidm.V1PersonAttrApipersonIdGetAttrGET /v1/person/{id}/_attr/{attr}
Kanidm.V1PersonAttrApipersonIdPostAttrPOST /v1/person/{id}/_attr/{attr}
Kanidm.V1PersonAttrApipersonIdPutAttrPUT /v1/person/{id}/_attr/{attr}
Kanidm.V1PersonCredentialApipersonGetIdCredentialStatusDELETE /v1/person/{id}/_credential/_status
Kanidm.V1PersonCredentialApipersonIdCredentialUpdateGetGET /v1/person/{id}/_credential/_update
Kanidm.V1PersonCredentialApipersonIdCredentialUpdateIntentTtlGetGET /v1/person/{id}/_credential/_update_intent/?ttl={ttl}
Kanidm.V1PersonRadiusApipersonIdRadiusGetGET /v1/person/{id}/_radiusGet and return a single str
Kanidm.V1PersonRadiusApipersonIdRadiusPostPOST /v1/person/{id}/_radius
Kanidm.V1PersonRadiusApipersonIdRadiusTokenGetGET /v1/person/{id}/_radius/_token
Kanidm.V1PersonSshPubkeysApipersonIdSshPubkeysGetGET /v1/person/{id}/_ssh_pubkeys
Kanidm.V1PersonSshPubkeysApipersonIdSshPubkeysPostPOST /v1/person/{id}/_ssh_pubkeys
Kanidm.V1PersonSshPubkeysTagApipersonIdSshPubkeysTagDeleteDELETE /v1/person/{id}/_ssh_pubkeys/{tag}
Kanidm.V1PersonSshPubkeysTagApipersonIdSshPubkeysTagGetGET /v1/person/{id}/_ssh_pubkeys/{tag}
Kanidm.V1PersonUnixApipersonIdUnixCredentialDeleteDELETE /v1/person/{id}/_unix/_credential
Kanidm.V1PersonUnixApipersonIdUnixCredentialPutPOST /v1/person/{id}/_unix/_credential
Kanidm.V1RawApirawCreatePOST /v1/raw/createRaw request to the system, be warned this can be dangerous!
Kanidm.V1RawApirawDeletePOST /v1/raw/deleteRaw request to the system, be warned this can be dangerous!
Kanidm.V1RawApirawModifyPOST /v1/raw/modifyRaw request to the system, be warned this can be dangerous!
Kanidm.V1RawApirawSearchPOST /v1/raw/searchRaw request to the system, be warned this can be dangerous!
Kanidm.V1RecycleBinApirecycleBinGetPOST /v1/recycle_bin
Kanidm.V1RecycleBinApirecycleBinIdGetGET /v1/recycle_bin/{id}
Kanidm.V1RecycleBinApirecycleBinReviveIdPostPOST /v1/recycle_bin/{id}/_revive
Kanidm.V1SchemaApischemaAttributetypeGetGET /v1/schema/attributetype
Kanidm.V1SchemaApischemaAttributetypeGetIdGET /v1/schema/attributetype/{id}
Kanidm.V1SchemaApischemaClasstypeGetGET /v1/schema/classtype
Kanidm.V1SchemaApischemaClasstypeGetIdGET /v1/schema/classtype/{id}
Kanidm.V1SchemaApischemaGetGET /v1/schema
Kanidm.V1SelfApiapplinksGetGET /v1/self/_applinksReturns your OAuth2 app links for the Web UI
Kanidm.V1SelfApiwhoamiGET /v1/self
Kanidm.V1SelfApiwhoamiUatGET /v1/self/_uat
Kanidm.V1ServiceAccountApiserviceAccountApiTokenDeleteDELETE /v1/service_account/{id}/_spi_token/{token_id}
Kanidm.V1ServiceAccountApiserviceAccountApiTokenGetGET /v1/service_account/{id}/_spi_token
Kanidm.V1ServiceAccountApiserviceAccountApiTokenPostPOST /v1/service_account/{id}/_spi_token
Kanidm.V1ServiceAccountApiserviceAccountCredentialGenerateGET /v1/service_account/{id}/_credential/_generate
Kanidm.V1ServiceAccountApiserviceAccountGetGET /v1/service_account
Kanidm.V1ServiceAccountApiserviceAccountIdCredentialStatusGetGET /v1/service_account/{id}/_credential/_status
Kanidm.V1ServiceAccountApiserviceAccountIdDeleteDELETE /v1/service_account/{id}
Kanidm.V1ServiceAccountApiserviceAccountIdDeleteAttrDELETE /v1/service_account/{id}/_attr/{attr}
Kanidm.V1ServiceAccountApiserviceAccountIdGetGET /v1/service_account/{id}
Kanidm.V1ServiceAccountApiserviceAccountIdGetAttrGET /v1/service_account/{id}/_attr/{attr}
Kanidm.V1ServiceAccountApiserviceAccountIdPatchPATCH /v1/service_account/{id}
Kanidm.V1ServiceAccountApiserviceAccountIdPostAttrPOST /v1/service_account/{id}/_attr/{attr}
Kanidm.V1ServiceAccountApiserviceAccountIdPutAttrPUT /v1/service_account/{id}/_attr/{attr}
Kanidm.V1ServiceAccountApiserviceAccountIdSshPubkeysGetGET /v1/service_account/{id}/_ssh_pubkeys
Kanidm.V1ServiceAccountApiserviceAccountIdSshPubkeysPostPOST /v1/service_account/{id}/_ssh_pubkeys
Kanidm.V1ServiceAccountApiserviceAccountIdSshPubkeysTagGetGET /v1/service_account/{id}/_ssh_pubkeys/{tag}
Kanidm.V1ServiceAccountApiserviceAccountIdUnixPostPOST /v1/service_account/{id}/_unix
Kanidm.V1ServiceAccountApiserviceAccountIntoPersonPOST /v1/service_account/{id}/_into_personDue to how the migrations work in 6 -> 7, we can accidentally
Kanidm.V1ServiceAccountApiserviceAccountPostPOST /v1/service_account
Kanidm.V1SyncAccountApisyncAccountGetGET /v1/sync_accountGet all? the sync accounts.
Kanidm.V1SyncAccountApisyncAccountIdAttrGetGET /v1/sync_account/{id}/_attr/{attr}
Kanidm.V1SyncAccountApisyncAccountIdAttrPutPOST /v1/sync_account/{id}/_attr/{attr}
Kanidm.V1SyncAccountApisyncAccountIdFinaliseGetGET /v1/sync_account/{id}/_finalise
Kanidm.V1SyncAccountApisyncAccountIdGetGET /v1/sync_account/{id}Get the details of a sync account
Kanidm.V1SyncAccountApisyncAccountIdPatchPATCH /v1/sync_account/{id}Modify a sync account in-place
Kanidm.V1SyncAccountApisyncAccountIdTerminateGetGET /v1/sync_account/{id}/_terminate
Kanidm.V1SyncAccountApisyncAccountPostPOST /v1/sync_account
Kanidm.V1SyncAccountApisyncAccountTokenDeleteDELETE /v1/sync_account/{id}/_sync_token
Kanidm.V1SyncAccountApisyncAccountTokenPostPOST /v1/sync_account/{id}/_sync_token
Kanidm.V1SystemApisystemAttrDeleteDELETE /v1/system/_attr/{attr}
Kanidm.V1SystemApisystemAttrGetGET /v1/system/_attr/{attr}
Kanidm.V1SystemApisystemAttrPostPOST /v1/system/_attr/{attr}
Kanidm.V1SystemApisystemAttrPutPUT /v1/system/_attr/{attr}
Kanidm.V1SystemApisystemGetGET /v1/system

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

token_jwt

  • Type: Bearer authentication (JWT)
1.1.0-rc.15

6 months ago

1.1.0-rc.15-dev

6 months ago