Object-oriented API for 3.0
See original GitHub issueThe current API does not make it clear that certain configuration options must be provided to both token generation and verification functions. I would like to suggest changing the API to capture the configuration state in an API class instance, rather than the current function-based approach.
- New classes:
HOTP
andTOTP
. - Default instances with recommended quick-start configurations.
- As this is a breaking change, either move legacy API to compat module or remove entirely.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11
Top Results From Across the Web
OpenAPI Specification - Version 3.0.3 - Swagger
The OpenAPI Specification defines a standard interface to RESTful APIs which allows both humans and computers to understand service capabilities without ...
Read more >OpenAPI Specification v3.0.0 | Introduction, Definitions, & More
The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs.
Read more >Generating an OpenAPI 3.0 Document for sObjects REST API ...
Accesses records based on the specified object ID. Retrieves, updates, or deletes records. Can retrieve field values. Use the GET method to retrieve...
Read more >OpenAPI 3.0 Tutorial | SwaggerHub Documentation
OpenAPI 3.0 is an open-source format for describing and documenting APIs. In this tutorial, we will write a simple API definition in the ......
Read more >OpenAPI 3.0: How to Design and Document APIs ... - YouTube
The OpenAPI Specification (OAS), based on the original Swagger 2.0 specification, has emerged as the world's standard for defining and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Pure JS prototypical inheritance is tricky. Most people are unfamiliar with it. ES6 introduces the more traditional class inheritance pattern. We can take advantage of Babel to write the new module using ES6.
I agree that a new module would be most appropriate. For lack of a better name, I’ll give it the code name of libotp.
@mikepb If use ES6/Babel/class, tools such as webpack/gulp may be need3ed for trancompilation. That should be consider for build process.
@mikepb i have never led in project before and api design is not my strength. i can learn on the side.