8.2.1 • Published 2 years ago

brightspace-auth-keys-dynamodb-store v8.2.1

Weekly downloads
22
License
Apache-2.0
Repository
github
Last release
2 years ago

brightspace-auth-keys-dynamodb-store

Build Status

DynamoDB based public key store implementation for brightspace-auth-keys.

Install

npm install brightspace-auth-keys brightspace-auth-keys-dynamodb-store --save

Usage

const KeyGenerator = require('brightspace-auth-keys').KeyGenerator;
const AWS = require('aws-sdk');
const DynamoDbPublicKeyStore = require('brightspace-auth-keys-dynamodb-store');
const db = new AWS.DynamoDB();
const tableName = 'auth_public_keys';


module.exports = new KeyGenerator({
	publicKeyStore: new DynamoDbPublicKeyStore(
		db,
		tableName
	),
	// see brightspace-auth-keys for the full set of options
});

Setup

For convenience the DynamoDB table can automatically be created in code, doing nothing if the table already exists so that it can be added to initialization code. It will be created with the TTL for the rows set on the ExpiresAt column.

const AWS = require('aws-sdk');
const DynamoDbPublicKeyStore = require('brightspace-auth-keys-dynamodb-store');
const db = new AWS.DynamoDB();
const tableName = 'auth_public_keys';
const readCapacity = 20; /* optional, default 5 */
const writeCapacity = 10; /* optional, default 5 */

DynamoDbPublicKeyStore.createTable(db, tableName, readCapacity, writeCapacity);
8.2.1

2 years ago

8.2.0

2 years ago

8.1.0

3 years ago

8.0.0

4 years ago

7.0.1

4 years ago

7.0.0

5 years ago

6.0.2

6 years ago

6.0.1

6 years ago

6.0.0

6 years ago