Module: Spree::UserApiAuthentication

Defined in:
app/models/concerns/spree/user_api_authentication.rb

Instance Method Summary collapse

Instance Method Details

#clear_spree_api_key!Object



8
9
10
11
# File 'app/models/concerns/spree/user_api_authentication.rb', line 8

def clear_spree_api_key!
  self.spree_api_key = nil
  save!
end

#generate_spree_api_key!Object



3
4
5
6
# File 'app/models/concerns/spree/user_api_authentication.rb', line 3

def generate_spree_api_key!
  self.spree_api_key = SecureRandom.hex(24)
  save!
end