@knetik/micro-credentials_store-s3

    3.1.2 • Public • Published

    Knetik Micro Credentials Store: S3

    This package provides a simple key value store using amazon aws' s3 service to the micro-core multi tenant framework.

    Setup the Credentials Store

    // config/environments/env.json
    
    {
      "CREDENTIALS_STORAGE_PROVIDER": "s3",
      "S3_CREDENTIALS_STORE_BUCKET": "micro-credentials-store",
      "AWS_PROFILE": "...",
    }
    

    2 contextualized stores are made available.

    • Core.CredentialsStore
    • App.CredentialsStore

    Methods

    On init the Core object will be assigned a credential store instance exposing three functions get, set, remove

    Core.CredentialsStore.set('token', '123123').then(token => token);
    Core.CredentialsStore.get('token').then(token => token /* 123123 */);
    Core.CredentialsStore.remove('token');
    

    On Core connect, the returned App instance will also be assigned a store instance but scoped to the app_id

    App.CredentialsStore.set('token', '321321').then(token => token);
    App.CredentialsStore.get('token').then(token => token /* 321321 */);
    App.CredentialsStore.remove('token');
    

    Keywords

    none

    Install

    npm i @knetik/micro-credentials_store-s3

    DownloadsWeekly Downloads

    1

    Version

    3.1.2

    License

    MIT

    Unpacked Size

    4.19 kB

    Total Files

    5

    Last publish

    Collaborators

    • knetik