Module: Spree::UserApiAuthentication

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) clear_spree_api_key



17
18
19
# File 'app/models/concerns/spree/user_api_authentication.rb', line 17

def clear_spree_api_key
  self.spree_api_key = nil
end

- (Object) clear_spree_api_key!



12
13
14
15
# File 'app/models/concerns/spree/user_api_authentication.rb', line 12

def clear_spree_api_key!
  clear_spree_api_key
  save!
end

- (Object) generate_spree_api_key



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

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

- (Object) generate_spree_api_key!



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

def generate_spree_api_key!
  generate_spree_api_key
  save!
end