0.0.1 • Published 7 years ago

identity-codes-security v0.0.1

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
7 years ago

identity-codes-security

Implements the BYU identity code API securities in a single module.

Parameters

configuration - an object that supplies the follow parameters:

Example

See the examples on the byu-group-mem page and the selective-middleware page

Instead of the BYU identity code api security middleware looking like the following:

api.use(select({
  base_path: '/domains/identity/levels_of_education',
  GET: ['/:variable/logs'],
  PUT: ['/:variable'],
  POST: [''],
  DELETE: ['/:variable'],
  prefix: group_mem({
    wso2_request_instance: wso2,
    group_name: 'identity-codes-admin'
  })
}));

It has been simplified to the following with the use of this package:

security({
  server: api,
  wso2_request_instance: wso2,
  code_api_name: 'levels_of_education',
});