auth-sdk-ts
v2.1.3
Published
SDK for Authentication as a Service.
Readme
Auth as a Service SDK
Typescript SDK for Authentication as a Service.
Installation
To get started run:
npm install auth-sdk-tsUsage/Examples
import { AuthClient } from 'auth-sdk-ts';
const client = new AuthClient({
baseUrl: "http://localhost:8080/v1",
});
const { role, policy, permission } = client;
const roles = await role.getAll();
const permissions = await permission.getAll();
const policies = await policy.getAll();
const newRole = await role.create({ name: "test" });
const newPermission = await permission.create({ resource: "test", action: "read" });
const newPolicy = await policy.create({ name: "test", kind: "ALLOW" });
