public class KShieldAuthManagerImpl extends Object implements KShieldAuthManager
Constructor and Description |
---|
KShieldAuthManagerImpl(AuthenticationService authService) |
Modifier and Type | Method and Description |
---|---|
void |
addAuth(UserInfo userInfo)
Call this after successfull kshield authentication
|
void |
addEndpoint(String ipAddress,
KShieldEndpoint ws)
Call this after establishing connection with WebSocket Endpoint
|
boolean |
hasAuth(String ipAddress,
String user)
This method checks kshield server if authentication info is missing
|
String |
poll(String ipAddress,
String userID,
boolean authenticated) |
void |
registerOnLoginHandler(AuthChangeHandler handler)
Register custom handler called after successful kshield authentication
|
void |
registerOnLogoutHandler(AuthChangeHandler handler)
Register custom handler called after kshield authentication removal
|
void |
removeAuth(String ipAddress)
Call this after denied kshield authentication from given ip address
|
void |
removeEndpoint(String ipAddress,
KShieldEndpoint ws)
IMPORTANT: Call this after closing connection with WebSocket Endpoint
|
void |
resetAuth(String ipAddress)
Remove all info about authentication from given ip address
|
public KShieldAuthManagerImpl(AuthenticationService authService)
public void addAuth(UserInfo userInfo)
KShieldAuthManager
addAuth
in interface KShieldAuthManager
public void addEndpoint(String ipAddress, KShieldEndpoint ws)
KShieldAuthManager
addEndpoint
in interface KShieldAuthManager
ws
- WebSocket Endpoint instancepublic boolean hasAuth(String ipAddress, String user)
KShieldAuthManager
hasAuth
in interface KShieldAuthManager
public String poll(String ipAddress, String userID, boolean authenticated)
poll
in interface KShieldAuthManager
userID
- userID returned by KeyShield SSO serverauthenticated
- user is authenticatedpublic void registerOnLoginHandler(AuthChangeHandler handler)
KShieldAuthManager
registerOnLoginHandler
in interface KShieldAuthManager
public void registerOnLogoutHandler(AuthChangeHandler handler)
KShieldAuthManager
registerOnLogoutHandler
in interface KShieldAuthManager
public void removeAuth(String ipAddress)
KShieldAuthManager
removeAuth
in interface KShieldAuthManager
public void removeEndpoint(String ipAddress, KShieldEndpoint ws)
KShieldAuthManager
removeEndpoint
in interface KShieldAuthManager
ws
- WebSocket Endpoint instancepublic void resetAuth(String ipAddress)
KShieldAuthManager
resetAuth
in interface KShieldAuthManager
Copyright © 2013 TDP Ltd. All Rights Reserved.