Module: MuckAuth::Models::MuckAuthentication::ClassMethods

Defined in:
lib/muck-auth/models/authentication.rb

Instance Method Summary collapse

Instance Method Details

#all_servicesObject



31
32
33
34
35
# File 'lib/muck-auth/models/authentication.rb', line 31

def all_services
  services = []
  Secrets.auth_credentials.each_key{ |s| services << s }
  services
end

#unused_services(current_authentications) ⇒ Object



37
38
39
# File 'lib/muck-auth/models/authentication.rb', line 37

def unused_services(current_authentications)
  all_services.find_all{ |s| !current_authentications.any?{ |c| c.provider == s } }
end