mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-13 16:38:24 +00:00
refactoring the testAuth methods
This commit is contained in:
parent
05e3b54977
commit
7af15bb237
2 changed files with 51 additions and 7 deletions
|
@ -32,7 +32,6 @@ import org.rundeck.api.RundeckApiException.RundeckApiLoginException;
|
|||
import org.rundeck.api.RundeckApiException.RundeckApiTokenException;
|
||||
import org.rundeck.api.domain.RundeckAbort;
|
||||
import org.rundeck.api.domain.RundeckExecution;
|
||||
import org.rundeck.api.domain.RundeckExecution.ExecutionStatus;
|
||||
import org.rundeck.api.domain.RundeckHistory;
|
||||
import org.rundeck.api.domain.RundeckJob;
|
||||
import org.rundeck.api.domain.RundeckJobsImportMethod;
|
||||
|
@ -40,6 +39,7 @@ import org.rundeck.api.domain.RundeckJobsImportResult;
|
|||
import org.rundeck.api.domain.RundeckNode;
|
||||
import org.rundeck.api.domain.RundeckProject;
|
||||
import org.rundeck.api.domain.RundeckSystemInfo;
|
||||
import org.rundeck.api.domain.RundeckExecution.ExecutionStatus;
|
||||
import org.rundeck.api.parser.AbortParser;
|
||||
import org.rundeck.api.parser.ExecutionParser;
|
||||
import org.rundeck.api.parser.HistoryParser;
|
||||
|
@ -158,12 +158,22 @@ public class RundeckClient implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test your credentials (login/password) on the RunDeck instance
|
||||
* Test the authentication on the RunDeck instance.
|
||||
*
|
||||
* @throws RundeckApiLoginException if the login fails
|
||||
* @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
|
||||
* @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
|
||||
*/
|
||||
public void testCredentials() throws RundeckApiLoginException {
|
||||
new ApiCall(this).testCredentials();
|
||||
public void testAuth() throws RundeckApiLoginException, RundeckApiTokenException {
|
||||
new ApiCall(this).testAuth();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #testAuth()}
|
||||
* @see #testAuth()
|
||||
*/
|
||||
@Deprecated
|
||||
public void testCredentials() throws RundeckApiLoginException, RundeckApiTokenException {
|
||||
testAuth();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue