0.2.3 • Published 2 years ago

@starnetbih/au2-auth v0.2.3

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

au2-auth

This library is a based on aurelia2-auth plugin and previous work done by SpoonX.

Full disclosure: this plugin is in alpha stage. Use at your own risk.

Installation

npm install @starnetbih/au2-auth or yarn add @starnetbih/au2-auth

Configuration

Inside of your main.ts/main.js file register the plugin on the register method:

import { AureliaAuthConfiguration } from '@starnetbih/au2-auth';

Aurelia.register(AureliaAuthConfiguration); 

//Or configure
Aurelia.register(
     AureliaAuthConfiguration.configure({responseTokenProp: 'bearerToken'})
);

Usage

import { IAppConfiguration } from '@starnetbih/au2-auth';

export class MyApp {

    constructor( @IAuthService private Auth: IAuthService ) { }

    async attached() {
        let resp = await this.Auth.login({
            credentials: { username: "admin", password: "admin" }
        });
        console.log(this.Auth.getTokenPayload());
    }
}
0.2.1

2 years ago

0.2.0

2 years ago

0.2.3

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago