Get IP Address from Client Session [message #1831659] |
Wed, 26 August 2020 04:22  |
Eclipse User |
|
|
|
Hello,
is there a way to get IP address from client that created the session in eclipse scout SDK ?
Kind Regards
[Updated on: Wed, 26 August 2020 04:23] by Moderator
|
|
|
|
|
Re: Get IP Address from Client Session [message #1832036 is a reply to message #1832013] |
Mon, 07 September 2020 03:21  |
Eclipse User |
|
|
|
Just create a new map instance then. You could override UiSession#createAndStartClientSession to do that (untested):
protected IClientSession createAndStartClientSession(Locale locale, UserAgent userAgent, Map<String, String> sessionStartupParams) {
Map<String, String> modfiableMap = new HashMap<>(sessionStartupParams);
modifiableMap.put("ipAddress", "[value]");
return BEANS.get(ClientSessionProvider.class).provide(ClientRunContexts.copyCurrent()
.withLocale(locale)
.withUserAgent(userAgent)
.withProperties(modifiableMap)); // Make startup parameters available at {@link PropertyMap#CURRENT} during client session is starting.
}
Cheers
André
[Updated on: Mon, 07 September 2020 07:26] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.08042 seconds