go-rundeck
go-rundeck copied to clipboard
Use custom cookiejar to prevent JSESSIONID errors
Hi !
This PR fix rundeck's bug about JSESSIONID
, currently rundeck doesn't allow api clients to get multiple sessions for the same user (but it should as mentionned in https://docs.rundeck.com/docs/administration/configuration/configuration-file-reference.html - see rundeck.security.maxSessions parameter).
When AuthMethod
is "token", it inject TokenAuthCookieJar
as http.CookieJar
and then remove JSESSIONID
cookies from request.
Same workaround has been implemented in official rundeck golang api (https://github.com/rundeck/go-rundeck/commit/38df8401023e7d1fa635d0eda9db6eca5d08ec8f)