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.23.0 app/models/tokens/one_time.rb
authpwn_rails-0.22.1 app/models/tokens/one_time.rb
authpwn_rails-0.22.0 app/models/tokens/one_time.rb
authpwn_rails-0.21.1 app/models/tokens/one_time.rb
authpwn_rails-0.21.0 app/models/tokens/one_time.rb
authpwn_rails-0.20.0 app/models/tokens/one_time.rb
authpwn_rails-0.19.0 app/models/tokens/one_time.rb
authpwn_rails-0.18.2 app/models/tokens/one_time.rb
authpwn_rails-0.18.1 app/models/tokens/one_time.rb
authpwn_rails-0.18.0 app/models/tokens/one_time.rb
authpwn_rails-0.17.2 app/models/tokens/one_time.rb
authpwn_rails-0.17.1 app/models/tokens/one_time.rb
authpwn_rails-0.17.0 app/models/tokens/one_time.rb
authpwn_rails-0.16.2 app/models/tokens/one_time.rb
authpwn_rails-0.16.1 app/models/tokens/one_time.rb
authpwn_rails-0.16.0 app/models/tokens/one_time.rb
authpwn_rails-0.15.3 app/models/tokens/one_time.rb
authpwn_rails-0.15.2 app/models/tokens/one_time.rb
authpwn_rails-0.15.1 app/models/tokens/one_time.rb
authpwn_rails-0.15.0 app/models/tokens/one_time.rb