2.2.0 • Published 11 months ago

authj v2.2.0

Weekly downloads
3
License
ISC
Repository
github
Last release
11 months ago

AuthJ

The Authentication System to generate a jwt securly in Express.js

Make sure You are conf the 'secret-key' with .env

Installation

Use the package manager npm to install authj.

npm i authj

Usage

const useAuthj = require('authj')

const authj = useAuthj()

authj.config('secret-key')

# For sign the key
authj. signToken({ username: "username", password: "password",userDetails: {}, isAuth: false })
.then((res) => {
      console.log(res);
     })
.catch((err) => {
      console.log(err);
     })


# For Check the token is valid or not
authj.checkToken({token : 'token'})
.then((res) => {
      console.log(res);
     })
.catch((err) => {
      console.log(err);
     })



# For Extract the value from token 
authj. getTokenInfo({token: 'token'})
.then((res) => {
      console.log(res);
     })
.catch((err) => {
      console.log(err);
     })

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Author

Sivakrishna sivakrishnacoc@gmail.com

1.2.0

11 months ago

1.1.0

11 months ago

1.0.0

11 months ago

1.9.0

11 months ago

1.8.0

11 months ago

1.7.0

11 months ago

1.6.0

11 months ago

1.5.0

11 months ago

1.4.0

11 months ago

1.3.0

11 months ago

2.2.0

11 months ago

2.1.0

11 months ago

2.0.0

11 months ago

0.0.1

4 years ago