Interface MfaService

All Superinterfaces:
JAXRSService
All Known Implementing Classes:
MfaServiceImpl

@Path("mfa") public interface MfaService extends JAXRSService
REST operations for MFA management.
  • Method Details

    • generate

      @POST @Path("{username}") @Produces("application/json") Mfa generate(@NotNull @PathParam("username") @NotNull String username)
      Generate MFA information for the given user.
      Parameters:
      username - username
      Returns:
      MFA information for the given user.
    • enroll

      @PUT @Consumes("application/json") void enroll(Mfa mfa)
      Store the provided MFA information for the calling user.
      Parameters:
      mfa - MFA information
    • dismiss

      @DELETE void dismiss()
      Dismiss MFA information for the calling user.
    • dismiss

      @DELETE @Path("{username}") void dismiss(@NotNull @PathParam("username") @NotNull String username)
      Dismiss MFA information for the given user.
      Parameters:
      username - username
    • enrolled

      @HEAD @Path("{username}") Response enrolled(@NotNull @PathParam("username") @NotNull String username)
      Checks if MFA information was enrolled for the given user.
      Parameters:
      username - username
      Returns:
      Response object featuring the boolean result in the 'X-Syncope-Verfied' header
    • check

      @POST @Path("check") @Consumes("application/json") Response check(MfaCheck mfaCheck)
      Check the provided OTP against the provided MFA secret.
      Parameters:
      mfaCheck - MFA secret and OTP
      Returns:
      Response object featuring the boolean result in the 'X-Syncope-Verfied' header