Building Web Service Security
Clone or download
pcai Merge pull request #34 from savonrb/travis-rbx
Allow rubinius failures in test matrix
Latest commit e2f21b0 Mar 7, 2018
Permalink
Failed to load latest commit information.
lib Bump version May 24, 2015
spec Fix regression caused by #20 May 20, 2015
.gitignore initial version extracted from the Savon library Jul 3, 2011
.rspec initial version extracted from the Savon library Jul 3, 2011
.travis.yml Allow rubinius failures in test matrix Feb 19, 2018
CHANGELOG.md
Gemfile Get tests passing again Nov 24, 2013
LICENSE initial version extracted from the Savon library Jul 3, 2011
README.md README: Use SVG badge [ci skip] Feb 19, 2018
Rakefile initial version extracted from the Savon library Jul 3, 2011
akami.gemspec Fix regression caused by #20 May 20, 2015

README.md

Akami Build Status

Building Web Service Security.

Installation

Akami is available through Rubygems and can be installed via:

$ gem install akami

Getting started

wsse = Akami.wsse

Set the credentials for wsse:UsernameToken basic auth:

wsse.credentials "username", "password"

Set the credentials for wsse:UsernameToken digest auth:

wsse.credentials "username", "password", :digest

Enable wsu:Timestamp headers. wsu:Created is automatically set to Time.now and wsu:Expires is set to Time.now + 60:

wsse.timestamp = true

Manually specify the values for wsu:Created and wsu:Expires:

wsse.created_at = Time.now
wsse.expires_at = Time.now + 60

Akami is based on an autovivificating Hash. So if you need to add custom tags, you can add them.

wsse["wsse:Security"]["wsse:UsernameToken"] = { "Organization" => "ACME" }

When generating the XML for the request, this Hash will be merged with another Hash containing all the default tags and values.
This way you might digg into some code, but then you can even overwrite the default values.

wsse.to_xml