0.0.4 • Published 5 years ago

@zhaow-de/oauth2orize-wmrm v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

npm npm (scoped) Build Status Coverage Status Codacy Badge Depfu

@zhaow-de/oauth2orize-wmrm

OAuth2orize response mode plugin providing support for Web Message Response Mode.

This response mode uses HTML5 Web Messaging instead of a redirect URI to return authorization responses from the authorization server.

Install

npm install --save @zhaow-de/oauth2orize-wmrm

Usage

Parse Request Extensions

The web message response mode defines additional parameters needed in the authorization request. Register support for these extensions with a Server instance in order to parse the parameters:

server.grant(require('@zhaow-de/oauth2orize-wmrm').extensions());

Add Response Mode

For each grant in which web message response mode is desired, add support by passing a modes option containing Web Message response mode. For example, using the token grant:

server.grant({ 
  modes: {
    web_message: require('@zhaow-de/oauth2orize-wmrm')
  } }, 
  oauth2orize.grant.token(function(client, user, ares, done) {
    // TODO: issue token
  })
);

Considerations

Specification

This module is implemented based on OAuth 2.0 Web Message Response Mode, draft version 00. As a draft, the specification remains a work-in-progress and is not final. The specification is under discussion within the OAuth Working Group of the IETF. Implementers are encouraged to track the progress of this specification and update implementations as necessary. Furthermore, the implications of relying on non-final specifications should be understood prior to deployment.

License

The MIT License

Copyright (c) 2016-2018 Jared Hanson [http://jaredhanson.net/](http://jaredhanson.net/)

0.0.4

5 years ago

0.0.3

5 years ago