Class: Stormpath::Rails::LoginForm

Inherits:
Object
  • Object
show all
Defined in:
app/forms/stormpath/rails/login_form.rb

Defined Under Namespace

Classes: FormError

Instance Attribute Summary collapse

Instance Method Summary collapse

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(, password, options = {})
  @login = 
  @password = password
  @organization_name_key = options[:organization_name_key]
  
  validate_password_presence
end

Instance Attribute Details

#authentication_resultObject

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

#loginObject

Returns the value of attribute login.



4
5
6
# File 'app/forms/stormpath/rails/login_form.rb', line 4

def 
  @login
end

#organization_name_keyObject

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

#passwordObject

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