Sha256: 6ed4fb1b48fb5a02589a8d1bb5b2c9c3c57ff28ec0be9c832cdb3882d29bbf75

Contents?: true

Size: 384 Bytes

Versions: 29

Compression:

Stored size: 384 Bytes

Contents

# :namespace
module Tokens

# One-time tokens can only be used once to authenticate an account.
class OneTime < Tokens::Base
  # Updates the token's state to reflect that it was used for authentication.
  #
  # One-time tokens become invalid after they are spent.
  #
  # Returns the token instance.
  def spend
    destroy
  end
end  # class Tokens::OneTime

end  # namespace Tokens

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
authpwn_rails-0.14.3 app/models/tokens/one_time.rb
authpwn_rails-0.14.2 app/models/tokens/one_time.rb
authpwn_rails-0.14.1 app/models/tokens/one_time.rb
authpwn_rails-0.14.0 app/models/tokens/one_time.rb
authpwn_rails-0.13.4 app/models/tokens/one_time.rb
authpwn_rails-0.13.3 app/models/tokens/one_time.rb
authpwn_rails-0.13.2 app/models/tokens/one_time.rb
authpwn_rails-0.13.1 app/models/tokens/one_time.rb
authpwn_rails-0.13.0 app/models/tokens/one_time.rb