Skip to content

Commit

Permalink
merge with latest main
Browse files Browse the repository at this point in the history
  • Loading branch information
jamalavedra committed Apr 4, 2024
2 parents 0c3b8d2 + 8d83e57 commit 9fb429e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ShieldJS is a TypeScript library for interacting with the Openfort Shield API. I

To use ShieldSDK in your project, install it via npm:
```bash
npm install @openfort/shield-sdk
npm install @openfort/shield-js
```

## Usage
Expand Down Expand Up @@ -98,4 +98,4 @@ If your Shield Dashboard is configured for Custom Authentication, use CustomAuth
const authOptions: CustomAuthOptions = {
customToken: "your-custom-token",
};
```
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openfort/shield-js",
"version": "0.1.2",
"version": "0.1.3",
"description": "",
"author": "Openfort",
"repository": {
Expand Down
12 changes: 10 additions & 2 deletions src/core/ShieldSDK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ export class ShieldSDK {
return {
secret: data.secret,
userEntropy: data.user_entropy,
encryptionParameters: data.encryption_parameters,
encryptionParameters: {
salt: data.salt,
iterations: data.iterations,
length: data.length,
digest: data.digest,
},
};
} catch (error) {
console.error(`unexpected error: ${error}`);
Expand All @@ -51,7 +56,10 @@ export class ShieldSDK {
body: JSON.stringify({
"secret": share.secret,
"user_entropy": share.userEntropy,
"encryption_parameters": share.encryptionParameters,
"salt": share.encryptionParameters?.salt,
"iterations": share.encryptionParameters?.iterations,
"length": share.encryptionParameters?.length,
"digest": share.encryptionParameters?.digest,
}),
});

Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const VERSION = "0.1.2";
export const VERSION = "0.1.3";
export const PACKAGE = "@openfort/shield-js";

0 comments on commit 9fb429e

Please sign in to comment.