Class: Gitlab::Auth::OAuth::Authentication

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/auth/o_auth/authentication.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider, user = nil) ⇒ Authentication

Returns a new instance of Authentication.


12
13
14
15
# File 'lib/gitlab/auth/o_auth/authentication.rb', line 12

def initialize(provider, user = nil)
  @provider = provider
  @user = user
end

Instance Attribute Details

#providerObject (readonly)

Returns the value of attribute provider


10
11
12
# File 'lib/gitlab/auth/o_auth/authentication.rb', line 10

def provider
  @provider
end

#userObject (readonly)

Returns the value of attribute user


10
11
12
# File 'lib/gitlab/auth/o_auth/authentication.rb', line 10

def user
  @user
end

Instance Method Details

#login(login, password) ⇒ Object

Implementation must return user object if login successful

Raises:

  • (NotImplementedError)

18
19
20
# File 'lib/gitlab/auth/o_auth/authentication.rb', line 18

def (, password)
  raise NotImplementedError
end