Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
808a9a93
Commit
808a9a93
authored
Jul 26, 2017
by
Greg Messner
Browse files
Fixed login() with API version and exposed setIgnoreCerificateErrors().
parent
19df544f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/GitLabApi.java
View file @
808a9a93
...
...
@@ -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.
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment