0.1.0 • Published 10 years ago

@mr-luke/vredux-auth v0.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
10 years ago

@mr-luke/vRedux

This is Authentication & Authorization module for VRedux apps.

Installation

npm install @mr-luke/vredux-auth

Basic Usage

import { VReduxModule, VReduxConfig }           from '@mr-luke/vredux';
import { VAuthModule, vAuthReducer, vAuth }     from '@mr-luke/vredux-auth';

const config-redux: VReduxConfig = {
    reducers: { auth: vAuthReducer },
    initState: {},
    middlewares: { thunk, vAuth, logger }
}

@NgModule({
    imports: [
        BrowserModule,
        VReduxModule.forRoot(config-redux),
        VAuthModule
    ]
})
export class AppModule {}

VAuthModule provides VAuth service that contains 3 helper methods:

  1. check() -> check if user is authenticated
  2. canAccess(priv: string|number, level: number) -> check if user can access data, resource or ath we'd like to restrict
  3. canModify(model: any, name: string) -> check if user can modify data or resource.

Module API

Apears soon...

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

0.1.0

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago