# File lib/stickshift-controller/lib/stickshift/auth_service.rb, line 9 def self.instance @ss_auth_provider.new end
# File lib/stickshift-controller/lib/stickshift/auth_service.rb, line 5 def self.provider=(provider_class) @ss_auth_provider = provider_class end
# File lib/stickshift-controller/lib/stickshift/auth_service.rb, line 19 def authenticate(request, login, password) return {:username => login, :auth_method => :login} end
# File lib/stickshift-controller/lib/stickshift/auth_service.rb, line 13 def generate_broker_key(app) iv = app.name token = app.user.login [iv, token] end
# File lib/stickshift-controller/lib/stickshift/auth_service.rb, line 23 def login(request, params, cookies) if params['broker_auth_key'] && params['broker_auth_iv'] return {:username => params['broker_auth_key'], :auth_method => :broker_auth} else data = JSON.parse(params['json_data']) return {:username => data["rhlogin"], :auth_method => :login} end end