Skip to main content

Class: LunaSec

This is the main class that you will instantiate on your node server. When created, it instantiates other classes and sets them as public properties you can use like the grant service and express plugin.

example myLunaSec.grants.verify('sessionId','someToken')

Constructors

constructor

โ€ข new LunaSec(config)

Parameters

NameType
configLunaSecConfig

Defined in

lunadefend/js/sdks/packages/node-sdk/src/main/index.ts:86

Properties

keyService

โ€ข keyService: KeyService

Defined in

lunadefend/js/sdks/packages/node-sdk/src/main/index.ts:76


grants

โ€ข grants: Grants

an instance of the grant service for handling grants, LunaSecs permission system

Defined in

lunadefend/js/sdks/packages/node-sdk/src/main/index.ts:78


expressAuthPlugin

โ€ข expressAuthPlugin: ExpressAuthPlugin

an instance of the auth plugin that can be optionally registered onto your express server if you would like to bootstrap from your own session management

Defined in

lunadefend/js/sdks/packages/node-sdk/src/main/index.ts:80


tokenDirective

โ€ข tokenDirective: typeof TokenDirective

A graphQL directive for automatically dealing with grants in your schema

Defined in

lunadefend/js/sdks/packages/node-sdk/src/main/index.ts:82


secureResolvers

โ€ข Optional secureResolvers: SecureResolver

LunaSec Secure Resolvers, for running functions that handle sensitive data in a secure context

Defined in

lunadefend/js/sdks/packages/node-sdk/src/main/index.ts:84