2018-12-13 13:39:08 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
# These calls help to authenticate to OAuth provider by providing username and password
|
|
|
|
#
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Auth
|
|
|
|
module OAuth
|
|
|
|
class Authentication
|
|
|
|
attr_reader :provider, :user
|
|
|
|
|
|
|
|
def initialize(provider, user = nil)
|
|
|
|
@provider = provider
|
|
|
|
@user = user
|
|
|
|
end
|
|
|
|
|
2018-04-04 21:44:52 +05:30
|
|
|
# Implementation must return user object if login successful
|
2018-03-27 19:54:05 +05:30
|
|
|
def login(login, password)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|