Sha256: 2f3060dac06df58a2e2033d7524d233631ba04bf2b82f2c8ce4449686872c191

Contents?: true

Size: 350 Bytes

Versions: 10

Compression:

Stored size: 350 Bytes

Contents

# :namespace
module Tokens

# API tokens can be used to issue API calls on behalf of an account.
class Api < Tokens::Base
  # NOTE: If we ever implement OAuth tokens, they should hang off of API
  #       tokens.

  # For now, we allow exactly one API token for each user.
  validates :user, uniqueness: { scope: :type }
end

end  # namespace Tokens

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
authpwn_rails-0.23.0 app/models/tokens/api.rb
authpwn_rails-0.22.1 app/models/tokens/api.rb
authpwn_rails-0.22.0 app/models/tokens/api.rb
authpwn_rails-0.21.1 app/models/tokens/api.rb
authpwn_rails-0.21.0 app/models/tokens/api.rb
authpwn_rails-0.20.0 app/models/tokens/api.rb
authpwn_rails-0.19.0 app/models/tokens/api.rb
authpwn_rails-0.18.2 app/models/tokens/api.rb
authpwn_rails-0.18.1 app/models/tokens/api.rb
authpwn_rails-0.18.0 app/models/tokens/api.rb