Class: Gitlab::Auth::OAuth::Authentication
- Inherits:
-
Object
- Object
- Gitlab::Auth::OAuth::Authentication
- Defined in:
- lib/gitlab/auth/o_auth/authentication.rb
Direct Known Subclasses
Crowd::Authentication, Database::Authentication, Ldap::Authentication
Instance Attribute Summary collapse
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(provider, user = nil) ⇒ Authentication
constructor
A new instance of Authentication.
-
#login(login, password) ⇒ Object
Implementation must return user object if login successful.
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
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
10 11 12 |
# File 'lib/gitlab/auth/o_auth/authentication.rb', line 10 def provider @provider end |
#user ⇒ Object (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
18 19 20 |
# File 'lib/gitlab/auth/o_auth/authentication.rb', line 18 def login(login, password) raise NotImplementedError end |