class OmniAuth::Strategies::BisXmlEnvelope

Public Class Methods

new(body, options = {}) click to toggle source
Calls superclass method
# File lib/omniauth-nwbbis.rb, line 178
def initialize(body, options = {})
    @body     = body
    @template = options.fetch(:template, self.class.template)

    @bis_user = options.fetch(:bis_user)
    @bis_password = options.fetch(:bis_password)

    super(@template)
end
template() click to toggle source
# File lib/omniauth-nwbbis.rb, line 156
def self.template
    %{
            <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
              <s:Header>
                <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                    <u:Timestamp u:Id="_0">
                        <u:Created><%= Time.now.iso8601 %></u:Created>
                        <u:Expires><%= (Time.now + 5*60).iso8601 %></u:Expires>
                    </u:Timestamp>
                    <o:UsernameToken u:Id="uuid-b42663dd-caca-4fb4-b5f9-c65c34ac59b4-1">
                        <o:Username><%= @bis_user %></o:Username>
                        <o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"><%= @bis_password %></o:Password>
                    </o:UsernameToken>
                </o:Security>
              </s:Header>
              <s:Body>
                <%= @body %>
              </s:Body>
            </s:Envelope>
    }
end

Public Instance Methods

result() click to toggle source
Calls superclass method
# File lib/omniauth-nwbbis.rb, line 188
def result
    super(binding)
end