1.1.0 • Published 7 years ago
node-global-identity v1.1.0
node-global-identity
Global identity library for node.js.
How to install
npm install node-global-identity
Usage
Instantiating With Params
import GlobalIdentity from 'node-global-identity';
const gim = new GlobalIdentity({
applicationKey: 'YOUR-APPLICATION-KEY',
apiKey: 'YOUR-API-KEY',
baseURL: 'GLOBAL-IDENTITY-URL',
});
or Setting Env Variables
export GLOBAL_APP_KEY=""
export GLOBAL_API_KEY=""
import GlobalIdentity from 'node-global-identity';
const gim = new GlobalIdentity();
Application Authorization
If you want to validate an application, you must encrypt a random string with the Client Application Secret Key.
gim.Authorization.validateApplication(
ClientApplicationKey,
RandomString,
RandomEncryptedString
)
Authorization
* gim.Authorization.authenticateUser( email: string, password:string) : Promise
* gim.Authorization.validateToken (token: string): Promise
* gim.Authorization.renewToken (oldToken: string): Promise
* gim.Authorization.isUserInRoles (userKey:string, roles: [string]): Promise
* gim.Authorization.recoverPassword (email:string): Promise
* gim.Authorization.validateApplication (clientApplicationKey:string, rawData:string, encryptedData: string): Promise
Management
* gim.Management.addUser (email: string, fullName: string, comment?:string): Promise
* gim.Management.getUser (email: string)
* gim.Management.deleteUser (email: string)
* gim.Management.getUserRoles (email: string): Promise
* gim.Management.associateRolesToUser (email: string, roles: string[]): Promise
* gim.Management.dissociateUserFromRole (email: string, roleName: string): Promise
Global Identity API Documentation
1.1.0
7 years ago
1.0.3
7 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago
0.1.2
9 years ago
0.1.0
9 years ago
0.0.12
10 years ago
0.0.11
10 years ago
0.0.10
10 years ago
0.0.9
10 years ago
0.0.8
10 years ago
0.0.7
10 years ago
0.0.6
10 years ago
0.0.5
10 years ago
0.0.4
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago