Method: Gitlab::Client::Users#session

Defined in:
lib/gitlab/client/users.rb

#session(email, password) ⇒ Gitlab::ObjectifiedHash

Note:

This method doesn’t require private_token to be set.

Creates a new user session.

Examples:

Gitlab.session('jack@example.com', 'secret12345')

Parameters:

  • email (String)

    The email of a user.

  • password (String)

    The password of a user.

Returns:


122
123
124
# File 'lib/gitlab/client/users.rb', line 122

def session(email, password)
  post('/session', body: { email: email, password: password }, unauthenticated: true)
end