Hi Deen I'm glad it worked for you. Did you use a regex with a character class <https://www.regular-expressions.info/refshorthand.html> such as *\s* e.g.:
"user":\s*"([^"]+)" If this worked for you and the example in the documentation did not, then perhaps the backslash must not be repeated and the documentation is wrong. i.e. we need to change the documentation from *\\s to \s*. But can you please confirm as at the moment I cannot test? To answer your final question, no, there is also an authentication cache (set to either 5 min or 10 min, I can't recall) that means the web service will only be called once every 5 or 10 minutes, so I don't think it is necessary to use "remember me". But I am just one user of the authkey web service. Others are free to chime in here, as well... Regards Peter On Sun, 8 Dec 2019 at 20:37, Deen <kensong...@gmail.com> wrote: > Hi Peter, > > True, I should've tested the regex before. Now with your regex tricks, I > managed to acchieve what I want. But here is the part I am not quite > getting > it > > According to the docs > > > > ^.*?\"user\"\\s*:\\s*\"([^\"]+)\".*$ > > > > json response where the username is contained in a > * > > property > * > > named > * > > user > * > > Given that {"user": "admin"}, so isn't "user" a *property* of the json > object? Then how should the json reponse > look like if I use regex above? > > Just a follow up question about what I actually want to to do. Following is > the context, > > We have our own auth, basically just a rest request via POST (username & > password), then the user gets the session id > and with this session id, users can consume our services. So I want to > resuse this session id for accessing GeoServer OWS as well. > > After playing with authkey modules, I do see how I can do it. > Namely just add a GET end point in our REST API to check sessionID if it is > valid when the user calls GeoServer OWS with authkey replacement. > > *My question:* > > 1. Is this how auth key is supposed to be used to integrate external auth > providers? > 2. In this case, every OWS request will trigger an additonal http GET for > geoserver auth, am I right? If yes, is there any way to use the auth > filter > "remember me" and "authkey" together? Is the filter chans the right > direction to go? > > Regards & Thanks > Deen > > > > > > > > > > > > -- > Sent from: > http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html > > > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before posting to > this list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > > If you want to request a feature or an improvement, also see this: > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users >
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users