Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

wrp-listener

wrp-listener is a library that provides a webhook registerer and a validation function to be used for authentication.

Build Status codecov.io Go Report Card Apache V2 License GitHub release PkgGoDev Quality Gate Status

Summary

Wrp-listener provides packages to help a consumer register to a webhook and authenticate messages received. Registering to a webhook can be done directly or set up to run at an interval. Message authentication is set up to work with the bascule library.

Table of Contents

Code of Conduct

This project and everyone participating in it are governed by the XMiDT Code Of Conduct. By participating, you agree to this Code.

Details

Authentication

Authentication is done using the bascule library: the token factory provided in the hashTokenFactory package can be given to the bascule Constructor middleware in order to verify that the hashed body given with a request is valid and created with the expected secret.

Registering

Registration happens through the webhookClient package, and can be set up for manual registration or registration at an interval. If the consumer of this package decides when to register, an error is returned if registering a webhook is not successful. With registering at an interval, a logger can be provided.
Then, if an error occurs, the registerer will log it and then try again at the next interval.

Contributing

Refer to CONTRIBUTING.md.

About

This library makes listening to WRP events from Xmidt easier to do.

Topics

Resources

License

Packages

No packages published

Languages