Package org.netxms.client
Interface TwoFactorAuthenticationCallback
public interface TwoFactorAuthenticationCallback
Login callback for implementing two factor authentication during login.
- 
Method SummaryModifier and TypeMethodDescriptionbyte[]getTrustedDeviceToken(long serverId, String username) Get trusted device token to be provided to the server.getUserResponse(String challenge, String qrLabel, boolean trustedDevicesAllowed) Get user response with selected authentication method.voidsaveTrustedDeviceToken(long serverId, String username, byte[] token) Save trusted device token.intselectMethod(List<String> methods) Select two-factor authentication method.
- 
Method Details- 
selectMethodSelect two-factor authentication method.- Parameters:
- methods- list of available two-factor authentication methods
- Returns:
- index of selected method or -1 to cancel login procedure
 
- 
getUserResponseGet user response with selected authentication method. This method will receive non-nullqrLabelif there is text to be displayed to user as QR code. Usually this indicates that new secret was generated for selected authentication method and should be presented to user.- Parameters:
- challenge- optional challenge text (could be null)
- qrLabel- text to be displayed as QR code for scan (could be null)
- trustedDevicesAllowed- true if trusted devices are allowed by the server
- Returns:
- user's response
 
- 
saveTrustedDeviceTokenSave trusted device token.- Parameters:
- serverId- server ID
- username- user name for which token should be provided
- token- trusted device token sent by server
 
- 
getTrustedDeviceTokenGet trusted device token to be provided to the server.- Parameters:
- serverId- server ID
- username- user name for which token should be provided
- Returns:
- trusted device token to provide to the server or null
 
 
-