Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@starnetbih/au2-auth

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@starnetbih/au2-auth

Auth plugin for aurelia 2 (alpha)

  • 0.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

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());
    }
}

FAQs

Package last updated on 25 Mar 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc