Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions samples/vault-api/credentials-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
VaultConfig,
SkyflowConfig,
SkyflowError,
DeleteResponse
DeleteResponse,
StringCredentials
} from 'skyflow-node';

/**
Expand All @@ -30,9 +31,11 @@ async function performSecureDataDeletion() {
privateKey: '<your-pem-private-key>' // Private key for authentication
};

const skyflowCredentials: Credentials = {
credentialsString: JSON.stringify(cred), // Token credentials
};
const stringCredentials: StringCredentials = {
credentialsString: JSON.stringify(cred), // Credentials string
}

const skyflowCredentials: Credentials = stringCredentials;

const credentials: Credentials = {
token: '<your_bearer_token>', // Bearer token
Expand Down
4 changes: 1 addition & 3 deletions samples/vault-api/insert-byot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ import {
async function performSecureDataInsertionWithBYOT() {
try {
// Step 1: Configure Credentials
const tokenCredentials: TokenCredentials = {
const credentials: Credentials = {
token: 'bearer', // Bearer token authentication
};

const credentials: Credentials = tokenCredentials;

// Step 2: Configure Vault
const primaryVaultConfig: VaultConfig = {
vaultId: 'your-vault-id', // Unique vault identifier
Expand Down
4 changes: 1 addition & 3 deletions samples/vault-api/insert-continue-on-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ import {
async function performSecureDataInsertion() {
try {
// Step 1: Configure Credentials
const apiCredentials: ApiKeyCredentials = {
const credentials: Credentials = {
// Using API Key authentication
apiKey: 'your-skyflow-api-key',
};

const credentials: Credentials = apiCredentials;


// Step 2: Configure Vault
const primaryVaultConfig: VaultConfig = {
Expand Down
4 changes: 1 addition & 3 deletions samples/vault-api/insert-records.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ import {
async function performSecureDataInsertion() {
try {
// Step 1: Configure Credentials
const apiKey: ApiKeyCredentials = {
const credentials: Credentials = {
// Using API Key authentication
apiKey: 'your-skyflow-api-key',
};

const credentials: Credentials = apiKey;

// Step 2: Configure Vault
const primaryVaultConfig: VaultConfig = {
vaultId: 'your-vault-id', // Unique vault identifier
Expand Down
Loading