2018-10-11 16:12:21 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-05 17:26:40 -05:00
|
|
|
# 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-03-26 05:23:54 -04:00
|
|
|
# Implementation must return user object if login successful
|
2018-03-05 17:26:40 -05:00
|
|
|
def login(login, password)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|