Class: Frostale
- Inherits:
-
Object
- Object
- Frostale
- Defined in:
- lib/frostale.rb
Instance Attribute Summary collapse
-
#emailaddress ⇒ Object
Returns the value of attribute emailaddress.
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#isAuth ⇒ Object
Returns the value of attribute isAuth.
-
#password ⇒ Object
Returns the value of attribute password.
-
#role ⇒ Object
Returns the value of attribute role.
-
#wdsl ⇒ Object
Returns the value of attribute wdsl.
Instance Method Summary collapse
- #authenticate ⇒ Object
-
#initialize(emailaddress, password, group, ldap_uri) ⇒ Frostale
constructor
A new instance of Frostale.
Constructor Details
#initialize(emailaddress, password, group, ldap_uri) ⇒ Frostale
Returns a new instance of Frostale.
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/frostale.rb', line 13 def initialize(emailaddress, password, group, ldap_uri) @mldap_uri = ldap_uri @wdsl = nil begin @wdsl = SOAP::WSDLDriverFactory.new(@mldap_uri) rescue => e e. end @emailaddress = emailaddress @password = password @groups = group end |
Instance Attribute Details
#emailaddress ⇒ Object
Returns the value of attribute emailaddress.
11 12 13 |
# File 'lib/frostale.rb', line 11 def emailaddress @emailaddress end |
#groups ⇒ Object
Returns the value of attribute groups.
11 12 13 |
# File 'lib/frostale.rb', line 11 def groups @groups end |
#isAuth ⇒ Object
Returns the value of attribute isAuth.
11 12 13 |
# File 'lib/frostale.rb', line 11 def isAuth @isAuth end |
#password ⇒ Object
Returns the value of attribute password.
11 12 13 |
# File 'lib/frostale.rb', line 11 def password @password end |
#role ⇒ Object
Returns the value of attribute role.
11 12 13 |
# File 'lib/frostale.rb', line 11 def role @role end |
#wdsl ⇒ Object
Returns the value of attribute wdsl.
11 12 13 |
# File 'lib/frostale.rb', line 11 def wdsl @wdsl end |
Instance Method Details
#authenticate ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/frostale.rb', line 26 def authenticate soap = @wdsl.create_rpc_driver # TODO: figure out how to make the params below dynamic response = soap.AuthenticateUser( :emailaddress => @emailaddress, :password => @password, :admins => @groups, :editors => '', :authors => '', :contributors => '', :subscribers => '' ) soap.reset_stream @isAuth = response.isAuthenticated @role = response.role end |