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.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/frostale.rb', line 10 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.
8 9 10 |
# File 'lib/frostale.rb', line 8 def emailaddress @emailaddress end |
#groups ⇒ Object
Returns the value of attribute groups.
8 9 10 |
# File 'lib/frostale.rb', line 8 def groups @groups end |
#isAuth ⇒ Object
Returns the value of attribute isAuth.
8 9 10 |
# File 'lib/frostale.rb', line 8 def isAuth @isAuth end |
#password ⇒ Object
Returns the value of attribute password.
8 9 10 |
# File 'lib/frostale.rb', line 8 def password @password end |
#role ⇒ Object
Returns the value of attribute role.
8 9 10 |
# File 'lib/frostale.rb', line 8 def role @role end |
#wdsl ⇒ Object
Returns the value of attribute wdsl.
8 9 10 |
# File 'lib/frostale.rb', line 8 def wdsl @wdsl end |
Instance Method Details
#authenticate ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/frostale.rb', line 23 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 |