1.1.9 • Published 5 years ago

go-auth-library v1.1.9

Weekly downloads
36
License
ISC
Repository
-
Last release
5 years ago

Objectives

Create different methods to authenticate a user.

  • create a connection to the DB.
  • check user credentials match.
  • thrid party connection.
  • return user with roles and permissions.

Methods: isAuthtenticated.

Parameters

  • DB credentials.

  • Google oAuth2 keys

Routes.

  • login POST:

    receive the credentials base64 format in basic Auth headers.

  • refresh_token POST:

    Generate a new token and refresh token using the old refresh token

  • logout DELETE:

    Remove the token and refresh token

  • google oAuth2

    get google authorization and save the token an refresh token. continue our flow to exchange the token. to refresh token verify again with google.

Middleware.

  • Token extractor.

    get the token from Authorization Header

  • Toke verification

    verify the token to be valid.

https://nimb.ws/3mEP9J

Publication

https://github.com/sindresorhus/np https://www.npmjs.com/package/go-auth-library

Doc: https://app.gitbook.com/@ventura/s/docs/microservices/go-auth-lib

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.1

5 years ago

1.1.2

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1-23

6 years ago

1.0.1-22

6 years ago

1.0.1-21

6 years ago

1.0.1-20

6 years ago

1.0.1-19

6 years ago

1.0.1-18

6 years ago

1.0.1-17

6 years ago

1.0.1-16

6 years ago

1.0.1-15

6 years ago

1.0.1-14

6 years ago

1.0.1-13

6 years ago

1.0.1-12

6 years ago

1.0.1-11

6 years ago

1.0.1-10

6 years ago

1.0.1-9

6 years ago

1.0.1-8

6 years ago

1.0.1-7

6 years ago

1.0.1-6

6 years ago

1.0.1-5

6 years ago

1.0.1-4

6 years ago

1.0.1-3

6 years ago

1.0.1-2

6 years ago

1.0.1-1

6 years ago

1.0.1-0

6 years ago