Dashboard-Plugin
Docs HomeDashboard plugins and appsInfomakerNaviga global
  • About
  • Intro
  • Getting started
  • The anatomy of a plugin
  • Manifest structure
  • Getting started
    • Get Dashboard-Plugin
    • Build
  • What's new
  • Components
    • Agent
      • Actions
    • Application
    • Widget
    • Health
    • Modal
    • Settings
  • API and GUI
    • API
      • Overview
      • register
        • Reducers
        • Portals
        • Requirements
        • Permissions
        • Default config
        • Config Modifiers
      • cache
      • store
      • encrypt
      • decrypt
      • createUUID
      • getLanguage
      • getTextDirection
      • getTimeFormat
      • getKeyCharFromCode
      • getKeyCodeFromChar
      • event
      • Logger
      • buildRouteUrlWithDispatchableEvent
      • getUser
      • getAction
      • getPortal
      • getConfig
      • getLocalize
      • getAvailableActions
      • getAvailablePortals
      • request
      • setHealth
      • openModal
      • closeModal
      • confirm
      • notifications
      • hasPermission
      • standalone
      • withUser
      • useModal
      • useSheet
      • useUser
      • useConfig
      • useLocalize
      • useApplication
      • useMappings
      • useStandalone
    • GUI
      • Core GUI
      • Style-Guide
    • Modules
      • GUI
      • Utility
      • NavigaID
        • getUserToken
        • getApplicationToken
        • getGroupsFromToken
  • Mappings
  • Plugins deployments
  • S3 upload
  • Deprecations
    • 4.1.0
    • 4.0.0
    • 2.1.0
Powered by GitBook
On this page
  • How to use
  • Encrypt params
  • Encrypt custom payload

Was this helpful?

  1. API and GUI
  2. API

encrypt

Encrypt data with Dashboard encryption api.

encrypt method returns a promise, which resolves when Dashboard successfully encrypted your payload and rejects if missing requirements or if something went wrong with Dashboard encryption api.

How to use

import { Plugin } from '@root'

Plugin.encrypt({
    ...ENCRYPT_PARAMS
}).then(data).catch(error)

Encrypt params

Param

Typeof

Default

Required

Description

payload

String

null

✅

the data that you want Dashboard to encrypt for you.

password

String

null

✅

the encryption password to use to encrypt your data.

Encrypt custom payload

import { Plugin } from '@root'

const dataToEncrypt = {
    username: 'Dashboard user',
    secretId: 'supper-secret-id'
}

Plugin.encrypt({
    payload: JSON.stringify(dataToEncrypt),
    password: 'my-super-secret-password'
}).then(encryptedData => {
    console.log(encryptedData)
}).catch(error => {
    console.error(error)
})

PreviousstoreNextdecrypt

Last updated 4 years ago

Was this helpful?