zhoujiexiong commented on code in PR #11445:
URL: https://github.com/apache/apisix/pull/11445#discussion_r1701120628


##########
apisix/plugins/cas-auth.lua:
##########
@@ -87,6 +89,9 @@ local function with_session_id(conf, ctx, session_id)
     else
         -- refresh the TTL
         store:set(session_id, user, SESSION_LIFETIME)
+        if conf.set_user_header then

Review Comment:
   What about the `hash/mapping` way as following:
   
   ```
   {
       "XPATH_such_as: /auth/user/node": "X-Forwarded-User", // could be the 
default setting
       "other_xpath_node_to_extract_value": "X-Forwarded-Foo" 
   }
   ```
   
   Some related Lua libs:
   - https://github.com/basiliscos/lua-xpath
   - https://github.com/bkersten/lua-xpath
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to