B
Blake Stanford
Guest
Thanks to all, I found that when I sent the j_username and j_password in as query string it worked. Seems strange that would be the case with a post request??? From Postman I was using the below without success. In the logs, the username and password were not being set: curl --location --request POST ' localhost:8170/.../j_spring_security_check --header 'Accept: application/json' --form 'j_username=restuser' --form 'j_password=password' Then out of morbid curiosity this morning tried: curl --location --request POST ' localhost:8170/.../j_spring_security_check?j_username=restuser&j_password=password' 'Accept: application/json' With query parameters I could see in the logs that the username and password were getting in correctly but had a different error: c.p.a.s.s.OEClientPrincipalFilter - Error converting Spring token to OEAuthenticationToken: java.lang.IndexOutOfBoundsException: No group 1 I found a post by BartMille about the OEClientPrincipalFilter.domainRoleFilter being set when it didn't need to be. I checked my config and sure enough I had set it to ROLE_PSCUser. I'm not sure why, but remove it. What a great feeling to see: { "access_token": "AKAAAQAAAAEAAKAAAgAAAAlyZXN0dXNlcgAAkAALAAAACAAAAABeWDvBADAADAAAAAIADACgABoAAAAPU1NPQWNjZXNzVG9rZW4AAKAADQAAAA1ST0xFX1BTQ1VzZXIAAKAADwAAADNCRTkzMkEwRDBGQUVCMDVCMkY3Njk3QTI3OTc3MDdDREMxRTNEOTY2QjBENC5vZWlkcAAA0AAQAAAACAAAAABeWEnRANAAFwAAAAj////////+1ADQABsAAAAI/////////tQA0AAcAAAACAAAAAAMwnAPALAAFQAAABDyme4zJKAGv51GR+AP1rEh", "refresh_token": "eeb8beb5-6d5f-437b-9fe1-67552637c519.oeidp", "token_type": "oecp", "expires_in": 3600 } all of the frustration, head banging, foot stomping and swearing stopped when that first token was returned. At this point 7:43am I'm going home, as there is no point in working any longer I'm going to have a bigger success. A special thanks to Mike J. He provided me with examples and answered many questions!
Continue reading...
Continue reading...