Perl 6 - the future is here, just unevenly distributed

IRC log for #openam, 2016-07-23

| Channels | #openam index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:20 MegaMatt joined #openam
06:51 aldaris joined #openam
10:48 MegaMatt joined #openam
11:42 aldaris joined #openam
12:20 MegaMatt joined #openam
12:21 aldaris joined #openam
12:59 MegaMatt joined #openam
13:33 aldaris joined #openam
16:13 aldaris joined #openam
19:34 aldaris joined #openam
19:53 _soma_ joined #openam
19:57 _soma_ hi
20:00 _soma_ I have an issue related to Not Enforces urls. I would like to have access everyone to an url with url params.
20:00 _soma_ url: http://web.openam.com:8080/myapp/login?route=profile
20:01 aldaris so specify the not enforced uri using *?* format
20:02 _soma_ what i have tried: /myapp/login, /myapp/login*, /myapp/login*?, /myapp/login*?*
20:02 _soma_ does not work
20:03 _soma_ i also tried /myapp/login?route=*
20:03 _soma_ but it does not match :(
20:03 aldaris have you tried login?*
20:03 aldaris sounds like a JEE agent?
20:04 _soma_ yes, apache-tomcat, J2EE mode
20:04 _soma_ i am going to try login?*
20:06 _soma_ the /myapp/login?* does not work :(
20:06 _soma_ i have no more idea...
20:07 aldaris have you looked at the debug logs yet?
20:07 _soma_ now my Not Enforced URIs list contains 5 items:
20:08 _soma_ 1. /myapp/login
20:08 _soma_ 2. /myapp/login/*
20:08 _soma_ 3. /myapp/login/*?
20:08 _soma_ 4. /myapp/login/*?*
20:08 _soma_ 5. /myapp/login?*
20:09 _soma_ the /myapp/login is available for everyone without login request
20:09 _soma_ the /myapp/login/?route=something is not matched :(
20:09 _soma_ the /myapp/login?route=something is not matched :(
20:09 _soma_ i am going to check the log
20:14 _soma_ what does it mean?
20:15 _soma_ URLPatternMatcher.match(http://web.example.com:8080/myapp/login): matching by pattern: http://web.example.com:8080/myapp/authentication/login.jsp
20:15 _soma_ login.jsp is a simple page under the web folder
20:19 _soma_ and i can see this in the log:
20:19 _soma_ NotenforcedURIHelper.isNotEnforced(http://web.example.com:8080/myapp/login?route=profile) => false
20:19 _soma_ maybe i need to restart openam?
20:31 _soma_ ---
20:31 _soma_ i can see some strange things in the log:
20:32 _soma_ AmFilter: incoming request =>
20:32 _soma_ -----------------------------------------------------------
20:32 _soma_ HttpServletRequest: class => org.apache.catalina.core.ApplicationHttpRequest
20:32 _soma_ Character Encoding: null
20:32 _soma_ Content Lenght: -1
20:32 _soma_ Content Type: null
20:32 _soma_ Locale: en_US
20:32 _soma_ Accept Locales:
20:32 _soma_ en_US
20:32 _soma_ en
20:32 _soma_ Protocol: HTTP/1.1
20:32 _soma_ Remote Address: 127.0.0.1
20:32 _soma_ Remote Host: 127.0.0.1
20:32 _soma_ Scheme: http
20:32 _soma_ Server Name: web.example.com
20:32 _soma_ Server Port: 8080
20:32 _soma_ Is Secure: false
20:32 _soma_ Auth Type: null
20:32 _soma_ Context Path: /myapp
20:32 _soma_ Cookies:
20:32 _soma_ JSESSIONID: 5BD1DA41FC43921EF484475ECE0DDEA4
20:32 _soma_ Headers:
20:32 _soma_ host:
20:32 _soma_ web.example.com:8080
20:32 _soma_ user-agent:
20:32 _soma_ Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
20:32 _soma_ accept:
20:32 _soma_ text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
20:32 _soma_ accept-language:
20:32 _soma_ en-US,en;q=0.5
20:33 _soma_ accept-encoding:
20:33 _soma_ gzip, deflate
20:33 _soma_ cookie:
20:33 _soma_ JSESSIONID=5BD1DA41FC43921EF484475ECE0DDEA4
20:33 _soma_ connection:
20:33 _soma_ keep-alive
20:33 _soma_ Method: GET
20:33 _soma_ Path Info: null
20:33 aldaris use pastebin maybe??
20:33 _soma_ Path Trans: null
20:33 _soma_ Query String: route=profile
20:33 _soma_ Remote User: null
20:33 _soma_ Requested Session ID: 5BD1DA41FC43921EF484475ECE0DDEA4
20:33 _soma_ Request URI: /myapp/index.jsp
20:33 _soma_ Servlet Path: /index.jsp
20:33 _soma_ Session: true
20:33 _soma_ User Principal: <not queried>
20:33 _soma_ Attributes:
20:33 _soma_ javax.servlet.forward.request_uri: /myapp/login/
20:33 _soma_ javax.servlet.forward.context_path: /myapp
20:33 _soma_ javax.servlet.forward.servlet_path: /login/
20:33 _soma_ javax.servlet.forward.query_string: route=profile
20:33 _soma_ javax.servlet.error.status_code: 404
20:33 _soma_ javax.servlet.error.message: /myapp/login/
20:33 _soma_ javax.servlet.error.servlet_name: default
20:33 _soma_ javax.servlet.error.request_uri: /myapp/login/
20:33 _soma_ -----------------------------------------------------------
20:33 _soma_ my request comes from index.jsp
20:33 _soma_ maybe because i use Angular JS....
20:36 _soma_ never heard about it
20:38 _soma_ sorry not angular, React!
20:38 _soma_ but it does not matter :)
20:39 _soma_ ok, i gotcha
20:40 aldaris so if you have request attributes for requestdispatcher forward
20:41 aldaris have you set the agent filter to get triggered for FORWARD dispatcher?
20:44 _soma_ this crazy react call index.html and it bootstrap some react javascript which analyzes the url and render the proper content based on the "fake" url.
20:45 _soma_ i have no changed the mentioned setting
20:45 _soma_ checking what is that
20:45 aldaris look at web.xml
20:48 _soma_ yes, it is configured
20:48 _soma_ http://pastebin.com/79tdT3Qe
20:48 _soma_ :)
20:49 aldaris then theoretically it should work
20:51 _soma_ cool
20:52 _soma_ thx !
20:56 _soma_ could you please explain where these attributes come from?
20:57 _soma_ they are part of urls
20:58 aldaris it's how your application is implemented
20:59 aldaris you access /myapp/login/ and that uses request dispatcher forward to /myapp/index.jsp apparently
21:01 _soma_ i think it is clear now:
21:02 _soma_ it is related to react. in my web.xml i have this (i did it):
21:02 _soma_ <error-page>
21:02 _soma_ <error-code>404</error-code>
21:02 _soma_ <location>/index.jsp</location>
21:02 _soma_ </error-page>
21:03 _soma_ it is necessary because react js use fake urls for routing
21:05 _soma_ if i click on a link which is a react Link object, not html "a href"  then react just overwrites/updates the browser url
21:05 _soma_ but it does not refresh the page, so this url does not exist. If i refresh the browser then i get a 404
21:06 _soma_ so always when i get 404 web server needs to be send a response with the index.jsp/html page
21:06 _soma_ which containc the react js javascript code
21:06 aldaris well that's one thing I didn't want to know :)
21:06 _soma_ and the magic here is
21:07 aldaris so maybe just create a servlet for myapp/login then?
21:07 _soma_ this JS code starts to analyze the url and render the proper content
21:07 _soma_ something like this
21:08 _soma_ the new MV whatever UI JS frameworks are so crazy...
21:09 _soma_ thank a lot
21:10 _soma_ it is time to go out, eat and think :)))
21:10 _soma_ and drink something
21:10 _soma_ have a good night!
21:10 aldaris te is, jó éjszakát :)
21:11 _soma_ ;)
22:38 _soma_ joined #openam
22:49 _soma_ solution: /myapp/login? and /myapp/index.jsp*?*
22:50 aldaris or change web.xml so that ERROR dispatcher events aren't captured?
22:52 MegaMatt joined #openam
22:58 _soma_ good idea, going to try

| Channels | #openam index | Today | | Search | Google Search | Plain-Text | summary