Class: Stormpath::Rails::PasswordChange

Inherits:
Object
  • Object
show all
Defined in:
app/services/stormpath/rails/password_change.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sptoken, password) ⇒ PasswordChange

Returns a new instance of PasswordChange.



6
7
8
9
# File 'app/services/stormpath/rails/password_change.rb', line 6

def initialize(sptoken, password)
  @account = ForgotPasswordTokenVerification.new(sptoken).call
  @password = password
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.



4
5
6
# File 'app/services/stormpath/rails/password_change.rb', line 4

def 
  @account
end

#passwordObject (readonly)

Returns the value of attribute password.



4
5
6
# File 'app/services/stormpath/rails/password_change.rb', line 4

def password
  @password
end

Instance Method Details

#callObject



11
12
13
14
# File 'app/services/stormpath/rails/password_change.rb', line 11

def call
  .password = password
  .save
end