Class: Stormpath::Rails::LoginForm
- Inherits:
-
Object
- Object
- Stormpath::Rails::LoginForm
- Defined in:
- app/forms/stormpath/rails/login_form.rb
Defined Under Namespace
Classes: FormError
Instance Attribute Summary collapse
-
#authentication_result ⇒ Object
Returns the value of attribute authentication_result.
-
#login ⇒ Object
Returns the value of attribute login.
-
#organization_name_key ⇒ Object
Returns the value of attribute organization_name_key.
-
#password ⇒ Object
Returns the value of attribute password.
Instance Method Summary collapse
-
#initialize(login, password, options = {}) ⇒ LoginForm
constructor
A new instance of LoginForm.
- #save! ⇒ Object
Constructor Details
#initialize(login, password, options = {}) ⇒ LoginForm
Returns a new instance of LoginForm.
7 8 9 10 11 12 13 |
# File 'app/forms/stormpath/rails/login_form.rb', line 7 def initialize(login, password, = {}) @login = login @password = password @organization_name_key = [:organization_name_key] validate_login_presence validate_password_presence end |
Instance Attribute Details
#authentication_result ⇒ Object
Returns the value of attribute authentication_result.
4 5 6 |
# File 'app/forms/stormpath/rails/login_form.rb', line 4 def authentication_result @authentication_result end |
#login ⇒ Object
Returns the value of attribute login.
4 5 6 |
# File 'app/forms/stormpath/rails/login_form.rb', line 4 def login @login end |
#organization_name_key ⇒ Object
Returns the value of attribute organization_name_key.
4 5 6 |
# File 'app/forms/stormpath/rails/login_form.rb', line 4 def organization_name_key @organization_name_key end |
#password ⇒ Object
Returns the value of attribute password.
4 5 6 |
# File 'app/forms/stormpath/rails/login_form.rb', line 4 def password @password end |
Instance Method Details
#save! ⇒ Object
21 22 23 |
# File 'app/forms/stormpath/rails/login_form.rb', line 21 def save! self.authentication_result = application.authenticate_oauth(password_grant_request) end |