Currently, SGS client can only request authentication using <username> and <password>, and its authentication responce is a boolean responce of either loggedIn or loginFail.
I want to expand the authentication functionality.
From my understanding, the following flow graph is a crude representation of a SGS login authentication…

SGS client...Requesting Authentication
SimpleClient::login()
implemented PasswordAuthentication SimpleClientListener::getPasswordAuthentication()
with responce of java.net.PasswordAuthentication with credentials data <username, password>
SGS server...Processing Authentication
implemented Identity IdentityAuthenticator::authenticateIdentity( IdentityCredentials )
with request of com.sun.sgs.auth.IdentityCredentials id,
which is implemented NamePasswordCredentials with credentials data <username, password>
with response from this method is com.sun.sgs.auth.Identity,
which is implemented com.sun.sgs.impl.auth.IdentityImpl with <username>
SGS client...Getting Authentication
implemented boolean SimpleClientListener::loggedIn()
OR
implemented SimpleClientListener::loginFailed(String reason)
+++++++++++++++++++++++++++++++++++++
What I want to do is the following...

SGS client...Authentication request
SimpleClient::login()
implemented IdentityCredentials SimpleClientListener::getIdentityCredentials()
with responce of implemented CustomIdentityCredentialsImpl with credentials data <x, y, z, ...>
SGS server...Processing Authentication
implemented Identity IdentityAuthenticator::authenticateIdentity( IdentityCredentials )
with request of com.sun.sgs.auth.IdentityCredentials id,
which is implemented CustomIdentityCredentialsImpl with credentials data <x, y, z, ...>
with response from this method is com.sun.sgs.auth.Identity,
which is implemented CustomIdentityImpl with data <a, b, c, ...>
SGS client...Authentication response
implemented boolean SimpleClientListener::loggedIn(com.sun.sgs.auth.Identity)
which is Identity instance of CustomIdentityImpl with data <a, b, c, ...>
OR
implemented SimpleClientListener::loginFailed(String reason)
Thanks