Class: Zimbra::AuthService

Inherits:
Handsoap::Service
  • Object
show all
Extended by:
HandsoapUriOverrides
Includes:
HandsoapErrors, HandsoapNamespaces
Defined in:
lib/zimbra/auth.rb

Defined Under Namespace

Classes: Builder, Parser

Instance Method Summary collapse

Methods included from HandsoapUriOverrides

envelope_namespace, request_content_type, uri

Methods included from HandsoapNamespaces

#request_namespaces, #response_namespaces

Methods included from HandsoapErrors

#http_error?, #http_not_found?, #on_after_create_http_request, #on_http_error, #report_error, #soap_fault_not_found?

Instance Method Details

#login(username, password) ⇒ Object



20
21
22
23
24
25
# File 'lib/zimbra/auth.rb', line 20

def (username, password)
  xml = invoke('n2:AuthRequest') do |message|
    Builder.auth(message, username, password)
  end
  Parser.auth_token(xml)
end

#on_create_document(doc) ⇒ Object



13
14
15
# File 'lib/zimbra/auth.rb', line 13

def on_create_document(doc)
  request_namespaces(doc)
end

#on_response_document(doc) ⇒ Object



16
17
18
# File 'lib/zimbra/auth.rb', line 16

def on_response_document(doc)
  response_namespaces(doc)
end