Skip to content

moteus/lzmq-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lzmq-auth

Build Status

Implementaion of czmq zauth class.
For now lzmq-auth does not support automatic reload password and certificates files.

###Install

Using LuaRocks:

You need install lzmq or lzmq-ffi (>3.1). To support unit test and CURVE certificate directory you need lua-path module.

luarocks install lzmq
luarocks install lzmq-auth
luarocks install lua-path
luarocks install luafilesystem

###Usage

local zmq   = require "lzmq"
local zauth = require "lzmq.auth"
local ctx   = zmq.context()
local auth  = zauth.new(ctx)

auth:start()            -- start ZAP service thread
auth:allow('127.0.0.1') -- add IP address to whitelist

-- regular ZMQ code

auth:stop()             -- stop ZAP service thread

Bitdeli Badge

About

Implementaion of czmq zauth class

Resources

License

Stars

Watchers

Forks

Packages

No packages published