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

@authllizer/vue

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@authllizer/vue

Vue Authllizer Plugin

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

Vue Authllizer Plugin

Source Code Version MIT License Bundle Size TypeScript

This plugin is a wrapper of Authllizer for comfortable using it in VueJs.

Example

There are VueJs example project in the source code.

Install

$ npm install --save @authllizer/vue
# and install peer dependencies 
$ npm install --save @authllizer/core

Setup

    import Vue from 'vue';
    import { default as VueAuthllizer } from '@authllizer/vue';
    import { IAuthllizerOptions } from '@authllizer/core';

    Vue.use(VueAuthllizer, {
        // ...
    } as IAuthllizerOptions);

Use

    import Vue from 'vue';
    import { Authllizer } from '@authllizer/core';

    class SomeComponent extends Vue {
        doSomething(){
            let auth: Authllizer = this.$auth;
        }
    }

Http Client

You can use another library as http client see in the doc HttpClient.

vue-axios

    import Vue from 'vue';
    import { IAuthllizerOptions } from '@authllizer/core';
    import VueAuthllizer, {  VueAxiosHttpClient } from '@authllizer/vue';
    import axios from 'axios';
    import * as VueAxios from 'vue-axios';

    Vue.use(VueAxios, axios);
    Vue.use(VueAuthllizer, {
        httpClient: new VueAxiosHttpClient
        // ...
    } as IAuthllizerOptions)

interceptor

    import { VueAxiosTokenInterceptor } from '@authllizer/vue';
    import Vue from 'vue';

    Vue.axios.interceptors.request.use(VueAxiosTokenInterceptor);

vue-resource

    import Vue from 'vue';
    import { IAuthllizerOptions } from '@authllizer/core';
    import VueAuthllizer from '@authllizer/vue';
    import * as VueResource from 'vue-resource';
    
    Vue.use(VueResource);
    Vue.use(VueAuthllizer, {...} as IAuthllizerOptions);

interceptor

    import { VueResourceTokenInterceptor } from '@authllizer/vue';
    import Vue from 'vue';
    Vue.resource.interceptors.push(VueResourceTokenInterceptor);

License

Copyright © 2017 Yisrael Eliav, Licensed under the MIT license.

Keywords

authllizer

FAQs

Package last updated on 03 Nov 2019

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