Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 30 Next »

[08:31:14 CDT(-0500)] <fairwinds> serac: hi ya
[08:31:24 CDT(-0500)] <serac> howdy
[08:31:54 CDT(-0500)] <fairwinds> I have been steadily working away. I have my erlang client working now
[08:32:09 CDT(-0500)] <serac> Language potpourri.
[08:33:10 CDT(-0500)] <fairwinds> serac: I wanted an integration with specific applications so yeah, had to go this way
[08:35:21 CDT(-0500)] <fairwinds> serac: kind of rough shifting gears between langs though. My ex wife was bilingual and sometimes when shifting gears she would call this frenglais cause a mixture of french and english. I have some fun sometimes with simple syntax mistakes for first couple of hours as I shift
[08:35:48 CDT(-0500)] <serac> Sounds completely normal.
[08:37:26 CDT(-0500)] <fairwinds> serac: I have been trying to get the REST thing to work. Followed instructions and set up dependency in pom.xml and put servelet in my web.xml. It is certainly activated but experiencing a problem
[08:37:49 CDT(-0500)] <fairwinds> serac: I am just using curl to examine requests at this point
[08:37:54 CDT(-0500)] <fairwinds> and also my logs
[08:38:16 CDT(-0500)] <serac> Share the error.
[08:38:25 CDT(-0500)] <fairwinds> well not using curl for logs but examining them after making the curl requests (smile)
[08:39:58 CDT(-0500)] <fairwinds> k, let me paste. It does not appear to be retrieving username password from params. Give me a sec to paste my curl and log info
[08:46:53 CDT(-0500)] <fairwinds> serac: k, here is my curl first https://gist.github.com/98b5ab3930b9137836ce
[08:49:38 CDT(-0500)] <serac> So you really have a user with those credentials?
[08:49:45 CDT(-0500)] <serac> testuser/password?
[08:50:05 CDT(-0500)] <serac> The server-side logs may shed more insight.
[08:51:02 CDT(-0500)] <fairwinds> serac: heh, yeah not so imaginative. this is just testing locally
[08:51:37 CDT(-0500)] <fairwinds> serac: https://gist.github.com/b56915bd7cec4428de9a
[08:51:46 CDT(-0500)] <fairwinds> serac: these are logs
[08:52:28 CDT(-0500)] <fairwinds> so what is happening is I am receiving no user info so my requests to my ticket end up with a null user
[08:53:09 CDT(-0500)] <fairwinds> I will be modifying my auth hander to look for this in future to throw an error rather than trying to retrieve user info with null
[08:53:42 CDT(-0500)] <fairwinds> but it seems I am not getting what I need from the restlet to the auth handler
[08:54:23 CDT(-0500)] <serac> Try not URL-encoding the POST data.
[08:54:39 CDT(-0500)] <fairwinds> k. give me a sec
[08:56:09 CDT(-0500)] <fairwinds> serac: haha, it worked
[08:56:47 CDT(-0500)] <fairwinds> serac: curl -vX POST "http://localhost:8080/sso/v1/tickets/" -d "username=testuser&password=password" -H "Accept: text/plain"
[08:58:45 CDT(-0500)] <fairwinds> serac: here is log https://gist.github.com/727e89fa62a13774cc19
[08:59:06 CDT(-0500)] <fairwinds> serac: much better, huh
[08:59:13 CDT(-0500)] <serac> Good deal.
[08:59:30 CDT(-0500)] <fairwinds> serac: that's sort of strange not to encode urls
[08:59:41 CDT(-0500)] <fairwinds> params
[09:00:15 CDT(-0500)] <serac> They're not URL parameters.
[09:00:26 CDT(-0500)] <serac> It's the body of POST.
[09:01:14 CDT(-0500)] <serac> I always get confused on the RFC details, but there is encoding that applies there as well but it's not the same.
[09:01:44 CDT(-0500)] <fairwinds> serac: right. btw why am I getting a html responses, I thought this would be getting xml
[09:02:40 CDT(-0500)] <serac> You shouldn't be getting either, really.
[09:03:00 CDT(-0500)] <serac> I'm not clear on the details of how errors are handled.
[09:03:21 CDT(-0500)] <serac> It's all headers and plain text.
[09:08:49 CDT(-0500)] <fairwinds> serac: k, I guess looking back at the https://wiki.jasig.org/display/CASUM/RESTful+API, I made some incorrect assumptions about what it might return. I was only showing response codes ie.
[09:08:49 CDT(-0500)]

<fairwinds> 201 Created Location: http://www.whatever.com/cas/v1/tickets/

Unknown macro: {TGT id}

[09:09:08 CDT(-0500)] <serac> That's actually a meaningful result.
[09:09:10 CDT(-0500)] <fairwinds> s/ I it
[09:09:27 CDT(-0500)] <serac> Strip off the last path element of that Location header and you have a TGT.
[09:10:43 CDT(-0500)] <fairwinds> serac: right. I should still be able to use. I will have to think on it a bit more. I was planning to use with phone apps
[09:12:24 CDT(-0500)] <fairwinds> serac: should be fine
[09:12:34 CDT(-0500)] <serac> Good deal.

  • No labels