brightspace-auth-keys-dynamodb-store

8.2.1 • Public • Published

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);

Readme

Keywords

none

Package Sidebar

Install

npm i brightspace-auth-keys-dynamodb-store

Weekly Downloads

0

Version

8.2.1

License

Apache-2.0

Unpacked Size

16.5 kB

Total Files

6

Last publish

Collaborators

  • d2l-travis-deploy