HTTPd - Pre-release 1.4.0 - WebHooks & Digest Authentication

Posted on
Thu Feb 07, 2019 5:28 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

HTTPd - Pre-release 1.4.0 - WebHooks & Digest Authentication

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

Posted on
Thu Feb 07, 2019 5:50 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

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

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:hookPass101@192.168.111.214: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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests