New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

vuencoder

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuencoder

Vue Ncoder Laravel API Encryption Frontend Package

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Vue Ncoder: Laravel API Encryption Frontend Package

GitHub issues GitHub forks GitHub stars

Vue Ncoder is a Axios Based Encryption package which encrypts API calls.

This was created to work with Laravel Framework. 

Installation

npm install vuencoder

##Usage

Configuration

plugins/vue-ncoder.js

import {VueNcoder} from 'vuencoder';
import Vue from "vue";

const key = 'your base64 Encryption Key';
const enableEncryption = true;  // Enable Or Disable Encryption

const axiosOptions = {
  baseURL: 'api/',
};

Vue.use(VueNcoder(key, enableEncryption), axiosOptions);

app.js

window.Vue = require('vue');
Vue.config.productionTip = false;

require('~/plugins/vue-ncoder');

const app = new Vue({
  el: '#app',
});

Example

Send Request

ncoder.post('auth/login', this.loginForm).then((response) => {
              // Success
              }).catch((error) => {
              // Error
              });

ncoder.get('auth/user').then((response) => {
              // Success
              }).catch((error) => {
              // Error
              });

Set Headers

ncoder.defaults.headers.common['Authorization'] = `Bearer ${token}`;

Credits

  • Contributors

Laravel Package

License

The MIT License (MIT). Please see License File for more information.

Keywords

vuencoder

FAQs

Package last updated on 01 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts