HTTPd - Pre-release 1.4.0 - WebHooks & Digest Authentication

User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

HTTPd - Pre-release 1.4.0 - WebHooks & Digest Authentication

Post by FlyingDiver »

https://github.com/FlyingDiver/Indigo-H ... /tag/1.4.0

Better than beta, but needs testing before it's a final release.

This release is intended to provide significantly enhanced support for supporting many different services that use webhook call-backs. The functionality provided with the "broadcast" command has been enhanced in the new "webhook" action. The new broadcast message now includes all the request headers, any URL encoded variable settings, as well as the payload. If the request has a content-type of "application/json", the payload is converted directly to the Python representation before the broadcast.

This release also supports Digest as the preferred authentication method, in addition to Basic authentication. There's a configuration option to require Digest authentication instead of Basic.

Details of the new webhook broadcast message will be posted to the Wiki shortly.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: HTTPd - Pre-release 1.4.0 - WebHooks & Digest Authentica

Post by FlyingDiver »

As an example, here's a curl command to invoke a webhook.

Code: Select all

 curl -X POST --digest -k  -H "Content-Type: application/json" -d '{"value1":"33","value2":"55","value3":"44"}' "https://hook_user:[email protected]:5566/webhook/httpd?name=power&foo=bar3"
This is an https call with Digest authentication. It has a JSON payload and two variables set on the URL. Also notice that the URL path is "webhook/httpd". In this case, the broadcast identifier would be "httpd_webhook/httpd" with a payload of:

Code: Select all

{
    'request': {
        'path': '/webhook/httpd', 
        'client': '192.168.111.214', 
        'command': 'POST', 
        'headers': {
            'content-length': '43', 
            'accept': '*/*', 
            'user-agent': 'curl/7.54.0', 
            'host': '192.168.111.214:5566', 
            'content-type': 'application/json', 
            'authorization': 'Digest username="hook_user", realm="HTTPd Plugin", nonce="7edbe98df265ad7368982f99fa892688", uri="/webhook/httpd?name=power&foo=bar3", cnonce="MDdlMWJlY2ZjNjQzNWE1MjllZGE3ZDdjNDQ4ODVmZTk=", nc=00000001, qop=auth, response="710747a229063156219ff6d985dfbe59", algorithm="MD5"'
        }
    }, 
    'payload': {
        u'value3': u'44', 
        u'value2': u'55', 
        u'value1': u'33'
    }, 
    'vars': {
        'foo': 'bar3', 
        'name': 'power'
    }
}
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Locked

Return to “Discontinued Plugins”