Class OTPViewModel

java.lang.Object
io.jans.casa.ui.vm.user.UserViewModel
io.jans.casa.ui.vm.user.OTPViewModel

public class OTPViewModel extends UserViewModel
This is the ViewModel of page otp-detail.zul. It controls the CRUD of HOTP/TOTP devices
Author:
jgomer
  • Constructor Details

    • OTPViewModel

      public OTPViewModel()
  • Method Details

    • isUiCorrectCode

      public boolean isUiCorrectCode()
    • isUiQRShown

      public boolean isUiQRShown()
    • isUiTokenPressing

      public boolean isUiTokenPressing()
    • getEditingId

      public int getEditingId()
    • getDigitLength

      public int getDigitLength()
    • getTokenType

      public String getTokenType()
    • getHardTokenType

      public OTPType getHardTokenType()
    • getCode

      public String getCode()
    • getNewDevice

      public OTPDevice getNewDevice()
    • getDevices

      public List<OTPDevice> getDevices()
    • getSecretKeyString

      public String getSecretKeyString()
    • setSecretKeyString

      public void setSecretKeyString(String secretKeyString)
    • setNewDevice

      public void setNewDevice(OTPDevice newDevice)
    • setCode

      public void setCode(String code)
    • childInit

      public void childInit() throws Exception
      Throws:
      Exception
    • chooseType

      public void chooseType(String type, org.zkoss.zk.ui.HtmlBasedComponent comp)
    • showQR

      public void showQR(org.zkoss.zk.ui.HtmlBasedComponent comp)
    • afterCompose

      public void afterCompose(org.zkoss.zk.ui.Component view)
    • timedOut

      public void timedOut(org.zkoss.zk.ui.event.Event event) throws Exception
      Throws:
      Exception
    • cancel

      public void cancel()
    • changeHardType

      public void changeHardType(boolean timeBased)
    • changeTokenPressing

      public void changeTokenPressing(org.zkoss.zk.ui.HtmlBasedComponent comp)
    • validateCode

      public void validateCode()
    • add

      public void add()
    • prepareForUpdate

      public void prepareForUpdate(OTPDevice dev)
    • cancelUpdate

      public void cancelUpdate(org.zkoss.zk.ui.event.Event event)
    • update

      public void update()
    • delete

      public void delete(OTPDevice device)