Zero Authentication Service - Ruby Client

This is a ruby client libraty for the Zero Authentication Service.

Usage

Generally:

client = Zas::Client.new
auth_result = client.authenticate(Zas::Credentials.new(:username => 'john', :password => 'letmein'))
p "You are authenticated" if auth_result.authenticated?

For HTTP Basic Auth

# everything from general usage
require 'zas/http_basic_credentials'
auth_result = client.authenticate(Zas::HttpBasicCredentials.new('Zm9vOmJhcg=='))
p "You've been authenticated" if auth_result.authenticated?

In irb:

bundle exec irb -Ilib -rzas
=> # everything from general usage

Configuration

config = Zas::ClientConfiguration.new(:name => 'my-client')
client = Zas::Client.new(config)

Notes

  • Zas::Client is not threadsafe
  • When using in irb call client.disconnect or CTRL-C to exit