Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API_13] RundeckClient builder not working with sessionId #5

Open
rmartev opened this issue Jun 15, 2015 · 0 comments
Open

[API_13] RundeckClient builder not working with sessionId #5

rmartev opened this issue Jun 15, 2015 · 0 comments

Comments

@rmartev
Copy link

rmartev commented Jun 15, 2015

After I have obtained the value of the JSESSIONID cookie (I've logged in using the plain API, not the java client), I'm trying to create a RundeckClienti with which I could run the other requests to the Rundeck server. Here is a snippet of my code:

RundeckClientBuilder clientBuilder = RundeckClient.builder();
clientBuilder.url(rundeckServerUrl);
clientBuilder.sessionId(jsessionid);
rundeckClient = clientBuilder.build();

where "jsessionid" is the value of the cookie, that I took from the password authentication (it is NOT null). The execution of this snippet throws the following exception:

java.lang.IllegalArgumentException: sessionId cannot be blank
at org.rundeck.api.util.AssertUtil.notBlank(AssertUtil.java:49)
at org.rundeck.api.RundeckClientBuilder.build(RundeckClientBuilder.java:94)

Am I missusing the API? Please, help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant