Commit 808a9a93 authored by Greg Messner's avatar Greg Messner
Browse files

Fixed login() with API version and exposed setIgnoreCerificateErrors().

parent 19df544f
......@@ -58,7 +58,7 @@ public class GitLabApi {
public static GitLabApi login(ApiVersion apiVersion, String url, String username, String password) throws GitLabApiException {
SessionApi sessionApi = new SessionApi(new GitLabApi(apiVersion, url, (String)null));
Session session = sessionApi.login(username, null, password);
return (new GitLabApi(url, session));
return (new GitLabApi(apiVersion, url, session));
}
/**
......@@ -243,6 +243,26 @@ public class GitLabApi {
return (apiClient);
}
/**
* Returns true if the API is setup to ignore SSL certificate errors, otherwise returns false.
*
* @return true if the API is setup to ignore SSL certificate errors, otherwise returns false
*/
public boolean getIgnoreCertificateErrors() {
return (apiClient.getIgnoreCertificateErrors());
}
/**
* Sets up the Jersey system ignore SSL certificate errors or not.
*
* WARNING: Setting this to true will affect ALL uses of HttpsURLConnection and Jersey.
*
* @param ignoreCertificateErrors if true will set up the Jersey system ignore SSL certificate errors
*/
public void setIgnoreCerificateErrors(boolean ignoreCertificateErrors) {
apiClient.setIgnoreCerificateErrors(ignoreCertificateErrors);
}
/**
* Get the version info for the GitLab server using the GitLab Version API.
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment