I'm trying to use the valence api in a headless manner.
Side note: I had to modify the hyperlinks so they were not links or I couldn't post the question.
Scenario 1:
When using the Java example provided, the following URLs are hit if no cookies are present:
Which gives me a 302 response and sends the browser to
Which gives me another 302 response and sends the browser to
Which is the D2L login screen. So I log in and a post with my credentials is sent to:
https://elearning.masked.edu/d2l/lp/auth/login/login.d2l
Finally, my browser is sent to the D2L home:
https://elearning.masked.edu/d2l/lp/homepage/home.d2l?ou=1234123
This doesn't follow the flow as listed in http://docs.valence.desire2learn.com/basic/auth.html . I was expecting a redirect to the appURL.
But, when we do this a second time, the expected result is achieved:
Scenario 2:
The difference is the cookies. When I delete the cookies for elearning.masked.edu, the result in scenario 1 always happens. So the question becomes what is the correct way to make the web-service authentication call when we are starting without cookies?