Class: Stormpath::Rails::ForgotPasswordTokenVerification
- Inherits:
-
Object
- Object
- Stormpath::Rails::ForgotPasswordTokenVerification
- Defined in:
- app/services/stormpath/rails/forgot_password_token_verification.rb
Instance Attribute Summary collapse
-
#sptoken ⇒ Object
readonly
Returns the value of attribute sptoken.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(sptoken) ⇒ ForgotPasswordTokenVerification
constructor
A new instance of ForgotPasswordTokenVerification.
Constructor Details
#initialize(sptoken) ⇒ ForgotPasswordTokenVerification
Returns a new instance of ForgotPasswordTokenVerification.
6 7 8 9 |
# File 'app/services/stormpath/rails/forgot_password_token_verification.rb', line 6 def initialize(sptoken) raise(NoSptokenError) if sptoken.nil? @sptoken = sptoken end |
Instance Attribute Details
#sptoken ⇒ Object (readonly)
Returns the value of attribute sptoken.
4 5 6 |
# File 'app/services/stormpath/rails/forgot_password_token_verification.rb', line 4 def sptoken @sptoken end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/services/stormpath/rails/forgot_password_token_verification.rb', line 11 def call begin account_from_token rescue Stormpath::Error => error raise if error.status != 404 raise InvalidSptokenError, error. end end |