3.1.5 • Published 2 days ago

@gbapis/auth v3.1.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 days ago

Getting started

Initialization

await GbAuthorization.initialize({
  storageType: 'mongo',
  connection: 'contection_string',
  aud: 'client_id',
  alias: 'application_alias',
  allowedRegions: ['US', '*'],
  mapAnonUsersTo: 'Users',
});

Note: k8s-deploy add clientid

Create users

await GbAuthorization.addUser({
  name: 'admin',
  preferredMail: 'admin@admin.com',
  roles: ['rol1', 'rol2'],
  aud: 'client_id',
});

Authorize by user region

app.use(GbAuthorization.autorizeRegion());

Authorize endpoint by role

router.get('/', GbAuthorization.authorize('Users'), (req: Request, res: Response) => {
  ...
})

Access to auth User

req.authUser;

Quicksuite

Orchestrator

utils/entity/service.api.ts

app/server.ts

3.1.3

2 days ago

3.1.2

2 days ago

3.1.1

2 days ago

3.1.5

2 days ago

3.1.4

2 days ago

3.1.0

7 days ago

3.0.13

12 days ago

3.0.14

12 days ago

3.0.12

7 months ago

3.0.4

7 months ago

3.0.3

7 months ago

3.0.10

7 months ago

3.0.2

7 months ago

3.0.11

7 months ago

3.0.1

7 months ago

3.0.8

7 months ago

3.0.7

7 months ago

3.0.6

7 months ago

3.0.5

7 months ago

3.0.0

7 months ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago