Class SessionApi

  • All Implemented Interfaces:
    Constants

    public class SessionApi
    extends AbstractApi
    This class implements the client side API for the GitLab login call.
    • Constructor Detail

      • SessionApi

        public SessionApi​(GitLabApi gitLabApi)
    • Method Detail

      • login

        public Session login​(String username,
                             String email,
                             String password)
                      throws GitLabApiException
        Login to get private token. This functionality is not available on GitLab servers 10.2 and above.
        GitLab Endpoint: POST /session
        Parameters:
        username - the username to login
        email - the email address to login
        password - the password of the user
        Returns:
        a Session instance with info on the logged in user
        Throws:
        GitLabApiException - if any exception occurs