Class: Stormpath::Rails::ForgotPasswordTokenVerification

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sptoken) ⇒ ForgotPasswordTokenVerification

Returns a new instance of ForgotPasswordTokenVerification.

Raises:



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

#sptokenObject (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

#callObject



11
12
13
14
15
16
17
18
# File 'app/services/stormpath/rails/forgot_password_token_verification.rb', line 11

def call
  begin
    
  rescue Stormpath::Error => error
    raise if error.status != 404
    raise InvalidSptokenError, error.message
  end
end