Socket
Socket
Sign inDemoInstall

openapi-security-handler

Package Overview
Dependencies
1
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # openapi-security-handler Changelog

## 2.0.1 - 2018-10-02
### Fixed
- Casing of `api` to `API` in exported interfaces.
## 2.0.0 - 2018-09-29

@@ -9,0 +13,0 @@ ### Added

8

index.ts
import { OpenAPI, OpenAPIV2, OpenAPIV3 } from 'openapi-types';
export interface IOpenapiSecurityHandler {
export interface IOpenAPISecurityHandler {
handle(request: OpenAPI.Request): Promise<void>
}
export interface OpenapiSecurityHandlerArgs {
export interface OpenAPISecurityHandlerArgs {
loggingKey: string

@@ -31,7 +31,7 @@ operationSecurity: Array<OpenAPIV2.SecurityRequirementObject | OpenAPIV3.SecurityRequirementObject>

export default class OpenapiSecurityHandler implements IOpenapiSecurityHandler {
export default class OpenAPISecurityHandler implements IOpenAPISecurityHandler {
private operationSecurity: Array<OpenAPIV2.SecurityRequirementObject | OpenAPIV3.SecurityRequirementObject>;
private securitySets: Array<Array<SecuritySet>>;
constructor(args: OpenapiSecurityHandlerArgs) {
constructor(args: OpenAPISecurityHandlerArgs) {
const loggingKey = args && args.loggingKey ? args.loggingKey + ': ' : '';

@@ -38,0 +38,0 @@ if (!args) {

{
"name": "openapi-security-handler",
"version": "2.0.0",
"version": "2.0.1",
"description": "A library to process OpenAPI security definitions in parallel.",

@@ -26,3 +26,3 @@ "scripts": {

"dependencies": {
"openapi-types": "^1.1.0"
"openapi-types": "^1.2.0"
},

@@ -29,0 +29,0 @@ "devDependencies": {

@@ -17,4 +17,4 @@ # openapi-security-handler [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url]

```javascript
import OpenapiSecurityHandler from 'openapi-security-handler';
const handler = new OpenapiSecurityHandler({
import OpenAPISecurityHandler from 'openapi-security-handler';
const handler = new OpenAPISecurityHandler({
// these are typically taken from the global api doc

@@ -21,0 +21,0 @@ securityDefinitions: {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc