Jump to: navigation, search

Getting the Last Login Info

The appropriate Configuration Server version is required to use this feature, and so is the correct security configuration. For details, refer to Chapter 11 (Last Logged In Display) in Genesys 8.0 Security Deployment Guide.

Configuration Server provides last login information during the user authentication (handshake) procedure, and the Platform SDK Configuration Protocol provides it "as-is" in the form of a KeyValueCollection:


An example of the resulting KeyValueCollection could look like:

   'LAST_LOGIN_PERSON' [int] = 100
   'LAST_LOGIN_TIME' [int] = 1259161588
This information is only available while the connection is opened.

Note that "last login" is configured on Configuration Server through the confserv.cfg file:

last-login = true
last-login-synchronization = true

Platform SDK obtains the information using the EventClientRegister message:

2012-08-21 10:05:49,306 [New I/O client worker #4-4] DEBUG ns.protocol.DuplexChannel null - Handling message:  'EventClientRegistered' (19) attributes:
        IATRCFG_SESSIONNUMBER [int] = 22
        IATRCFG_CFGSERVERDBID [int] = 99
        SATRCFG_PROTOCOL [str] = "CfgProtocol"
        IATRCFG_EXTERNALAUTH [int] = 0
        SATRCFG_PARAMETERS [KvListString] = KVList:
'LAST_LOGIN_PERSON' [int] = 1227
'LAST_LOGIN_TIME' [int] = 1345532749
        IATRCFG_UNSOLEVENTNUM [int] = 73770
        IATRCFG_CRYPTPASSW [int] = 1
        SATRCFG_SCHEMAVERSION [str] = ""
        IATRCFG_REQUESTID [int] = 6
        SATRCFG_PROTOCOLEX [str] = "CfgProtocol"

There are two methods available in Platform SDK for retrieving last login details:

  • protocol.getServerContext().getLastLoginInfo()
  • protocol.getServerContext().getCfgLastLogin() (deprecated, not recommended for use)

If these methods return null, then you need to check whether Configuration Server gave the required info by looking in the debug logs for either Platform SDK or Configuration Server.

This page was last modified on September 26, 2013, at 08:01.


Comment on this article:

blog comments powered by Disqus