Skip to content

moteus/lzmq-auth

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

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

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