1.5.4 • Published 5 years ago

vue-aspnet-auth v1.5.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

vue-aspnet-auth

GitHub license Build Status codecov npm Greenkeeper badge semantic-release

A Vue plugin wrapper for aspnet-auth.

Getting Started

Install

From npm

npm install vue-aspnet-auth --save

Usage

Import and initialize the plugin.

import { AspnetAuth } from 'vue-aspnet-auth';

Vue.use(AspnetAuth, {
  url: 'http://localhost:46993',
});

Basic login example:

export default {
  name: 'login',
  data() {
    return {
      username: '',
      password: '',
    };
  },
  methods: {
    login() {
      this.$auth.login(this.username, this.password, (data) => {
        if (data.result) {
          this.$store.commit('auth', this.$auth.authentication);
          this.$root.$emit('app.loggedin');
        } else {
          this.error = data.message;
        }
      });
    },
  },
  created() {
	// initialize url
    this.$auth.url = `http://localhost:1234`;
  },
};

License

Copyright © 2018 Code HQ (Pty) Ltd. This source code is licensed under the MIT license found in the LICENSE file.


Made with ♥ by Craig Pretorius

1.5.4

5 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

0.0.0-beta

6 years ago

1.5.0

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago