@poweriam/sdk v2.4.0
@poweriam/sdk
PowerIAM - JavaScript client for @poweriam/sdk The API follows the contract/expand strategy.This means the versioning policy is additive.Within the same major version, all endpoints are backwards compatible.Only the APIs with the latest patch version of each major version are defined below. This SDK is automatically generated by the Swagger Codegen project:
- API version: v2.4.0
- Package version: 2.4.0
- Build package: io.swagger.codegen.v3.generators.javascript.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 @poweriam/sdk --save
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 PowerIAM = require('@poweriam/sdk');
var defaultClient = PowerIAM.ApiClient.instance;
// Configure API key authorization: JWT Token
var JWT Token = defaultClient.authentications['JWT Token'];
JWT Token.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT Token.apiKeyPrefix['Authorization'] = "Token"
var api = new PowerIAM.AccessApi()
var opts = {
'inRealmId': "inRealmId_example", // {String}
'inExternalRealmId': "inExternalRealmId_example", // {String}
'permissions': ["permissions_example"], // {[String]}
'userId': "userId_example" // {String}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.assurePermissions(opts, callback);
Documentation for API Endpoints
All URIs are relative to http://localhost:9000
Class | Method | HTTP request | Description |
---|---|---|---|
PowerIAM.AccessApi | assurePermissions | GET /v2/assure-permissions | |
PowerIAM.AccessApi | getPermissionsGranted | GET /v2/get-permissions-granted | |
PowerIAM.AssignmentApi | assignRole | POST /v2/assign-role | |
PowerIAM.AssignmentApi | getRoleAssignments | GET /v2/get-role-assignments | |
PowerIAM.AssignmentApi | unassignRole | DELETE /v2/unassign-role | |
PowerIAM.AuthApi | authenticate | POST /v2/authenticate | |
PowerIAM.AuthApi | confirmAccount | POST /v2/confirm-account | |
PowerIAM.AuthApi | connectIdentity | POST /v2/connect-identity | |
PowerIAM.AuthApi | createAccount | POST /v2/create-account | |
PowerIAM.AuthApi | forgetPassword | POST /v2/forget-password | |
PowerIAM.AuthApi | getAuthenticationMethods | GET /v2/get-authentication-methods | |
PowerIAM.AuthApi | resetPassword | POST /v2/reset-password | |
PowerIAM.AuthApi | sendEmailVerificationEmail | POST /v2/send-email-verification-email | |
PowerIAM.AuthApi | verifyEmail | POST /v2/verify-email | |
PowerIAM.DomainApi | createDomain | POST /v2/create-domain | |
PowerIAM.DomainApi | deleteDomain | DELETE /v2/delete-domain | |
PowerIAM.DomainApi | editDomain | PUT /v2/edit-domain | |
PowerIAM.DomainApi | getDomain | GET /v2/get-domain | |
PowerIAM.DomainApi | getDomains | GET /v2/get-domains | |
PowerIAM.InvitationApi | acceptInvitation | PUT /v2/accept-invitation | |
PowerIAM.InvitationApi | invite | POST /v2/invite | |
PowerIAM.PermissionApi | createPermission | POST /v2/create-permission | |
PowerIAM.PermissionApi | deletePermission | DELETE /v2/delete-permission | |
PowerIAM.PermissionApi | editPermission | PUT /v2/edit-permission | |
PowerIAM.PermissionApi | getPermission | GET /v2/get-permission | |
PowerIAM.PermissionApi | getPermissions | GET /v2/get-permissions | |
PowerIAM.RealmApi | addUserToRealm | POST /v2/add-user-to-realm | |
PowerIAM.RealmApi | createRealm | POST /v2/create-realm | |
PowerIAM.RealmApi | deleteRealm | DELETE /v2/delete-realm | |
PowerIAM.RealmApi | editRealm | PUT /v2/edit-realm | |
PowerIAM.RealmApi | getRealm | GET /v2/get-realm | |
PowerIAM.RealmApi | getRealms | GET /v2/get-realms | |
PowerIAM.RealmApi | removeUserFromRealm | DELETE /v2/remove-user-from-realm | |
PowerIAM.RoleApi | addPermissionToRole | PUT /v2/add-permission-to-role | |
PowerIAM.RoleApi | createRole | POST /v2/create-role | |
PowerIAM.RoleApi | deleteRole | DELETE /v2/delete-role | |
PowerIAM.RoleApi | editRole | PUT /v2/edit-role | |
PowerIAM.RoleApi | getRole | GET /v2/get-role | |
PowerIAM.RoleApi | getRolePermissions | GET /v2/get-role-permissions | |
PowerIAM.RoleApi | getRoles | GET /v2/get-roles | |
PowerIAM.RoleApi | removePermissionFromRole | DELETE /v2/remove-permission-from-role | |
PowerIAM.RoleApi | setRolePermissions | PUT /v2/set-role-permissions | |
PowerIAM.UserApi | getUser | GET /v2/get-user | |
PowerIAM.UserApi | getUsers | GET /v2/get-users |
Documentation for Models
- PowerIAM.AccountConfirmationV2
- PowerIAM.AddUserToRealmCommandV2
- PowerIAM.AssignRoleCommandV2
- PowerIAM.AssignmentV2
- PowerIAM.AuthMethodV2
- PowerIAM.AuthenticateCommandV2
- PowerIAM.AuthenticationMethodsV2
- PowerIAM.Command
- PowerIAM.CommandV2
- PowerIAM.ConfirmAccountCommandV2
- PowerIAM.ConnectIdentityCommandV2
- PowerIAM.CreateAccountCommandV2
- PowerIAM.CreateDomainCommandV2
- PowerIAM.CreatePermissionCommandV2
- PowerIAM.CreateRealmCommandV2
- PowerIAM.CreateRoleCommandV2
- PowerIAM.DomainV2
- PowerIAM.EditRealmCommandV2
- PowerIAM.EmailVerificationV2
- PowerIAM.ForgetPasswordCommandV2
- PowerIAM.GetRealmsCommandV2
- PowerIAM.IdentityProviderV2
- PowerIAM.IdentityV2
- PowerIAM.InvitationStatusV2
- PowerIAM.InvitationV2
- PowerIAM.InviteCommandV2
- PowerIAM.OidcCredentialsV2
- PowerIAM.OidcMethodV2
- PowerIAM.OidcResponseModeV2
- PowerIAM.PasswordCredentialsV2
- PowerIAM.PermissionV2
- PowerIAM.RealmV2
- PowerIAM.ResetPasswordCommandV2
- PowerIAM.RoleV2
- PowerIAM.SendEmailVerificationEmailCommandV2
- PowerIAM.UserV2
- PowerIAM.VerifyEmailCommandV2
Documentation for Authorization
JWT Token
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header