Socket
Socket
Sign inDemoInstall

@dsaid/swagger-ui-plugin-otp-auth

Package Overview
Dependencies
5
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dsaid/swagger-ui-plugin-otp-auth

This is a OTP authentication plugin for [Swagger UI](https://swagger.io/docs/open-source-tools/swagger-ui/customization/plugin-api/).


Version published
Maintainers
1
Created

Readme

Source

@dsaid/swagger-ui-plugin-otp-auth npm version

This is a OTP authentication plugin for Swagger UI.

Prerequisites

Install

$ npm install @dsaid/swagger-ui-plugin-otp-auth

Usage

import OtpAuthPlugin from '@dsaid/swagger-ui-plugin-otp-auth'

// swagger-ui initialization
  SwaggerUI({
    plugins: [
      OtpAuthPlugin,
      ...
    ]
  })

Swagger Configuration

components:
  securitySchemes:
    OtpAuth:
      # base config
      type: http
      scheme: bearer
      otp: true
      # token url
      tokenUrl: /api/otp/
      # request path and method
      requestOtpPath: /new
      requestOtpMethod: post 
      requestOtpQuery:
        service: service-name
      # auth path and method
      authPath: /authenticate
      authMethod: post
      authQuery:
        service: service-name
        expiry: 10800

security:
  - OtpAuth: []

FAQs

Last updated on 05 May 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc