webapi.xml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * MageSpecialist
  5. *
  6. * NOTICE OF LICENSE
  7. *
  8. * This source file is subject to the Open Software License (OSL 3.0)
  9. * that is bundled with this package in the file LICENSE.txt.
  10. * It is also available through the world-wide-web at this URL:
  11. * http://opensource.org/licenses/osl-3.0.php
  12. * If you did not receive a copy of the license and are unable to
  13. * obtain it through the world-wide-web, please send an email
  14. * to info@magespecialist.it so we can send you a copy immediately.
  15. *
  16. * @category MSP
  17. * @package MSP_TwoFactorAuth
  18. * @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it)
  19. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  20. */
  21. -->
  22. <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  23. xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
  24. <route url="/V1/msp-2fa/installed-providers" method="GET">
  25. <service class="\MSP\TwoFactorAuth\Api\TfaInterface" method="getAllProviders"/>
  26. <resources>
  27. <resource ref="MSP_TwoFactorAuth::tfa" />
  28. </resources>
  29. </route>
  30. <route url="/V1/msp-2fa/forced-providers" method="GET">
  31. <service class="\MSP\TwoFactorAuth\Api\TfaInterface" method="getForcedProviders"/>
  32. <resources>
  33. <resource ref="MSP_TwoFactorAuth::tfa" />
  34. </resources>
  35. </route>
  36. <route url="/V1/msp-2fa/user-providers/:userId" method="GET">
  37. <service class="\MSP\TwoFactorAuth\Api\TfaInterface" method="getUserProviders"/>
  38. <resources>
  39. <resource ref="MSP_TwoFactorAuth::tfa" />
  40. </resources>
  41. </route>
  42. <route url="/V1/msp-2fa/providers-to-activate/:userId" method="GET">
  43. <service class="\MSP\TwoFactorAuth\Api\TfaInterface" method="getProvidersToActivate"/>
  44. <resources>
  45. <resource ref="MSP_TwoFactorAuth::tfa" />
  46. </resources>
  47. </route>
  48. <route url="/V1/msp-2fa/trusted-devices/:userId" method="GET">
  49. <service class="\MSP\TwoFactorAuth\Api\TfaInterface" method="getTrustedDevices"/>
  50. <resources>
  51. <resource ref="MSP_TwoFactorAuth::tfa" />
  52. </resources>
  53. </route>
  54. <route url="/V1/msp-2fa/trusted-devices/:tokenId" method="DELETE">
  55. <service class="\MSP\TwoFactorAuth\Api\TrustedManagerInterface" method="revokeTrustedDevice"/>
  56. <resources>
  57. <resource ref="MSP_TwoFactorAuth::tfa" />
  58. </resources>
  59. </route>
  60. <route url="/V1/msp-2fa/default-provider-code/:userId" method="GET">
  61. <service class="\MSP\TwoFactorAuth\Api\UserConfigManagerInterface" method="getDefaultProvider"/>
  62. <resources>
  63. <resource ref="MSP_TwoFactorAuth::tfa" />
  64. </resources>
  65. </route>
  66. <route url="/V1/msp-2fa/default-provider-code/:userId" method="PUT">
  67. <service class="\MSP\TwoFactorAuth\Api\TfaInterface" method="setDefaultProviderCode"/>
  68. <resources>
  69. <resource ref="MSP_TwoFactorAuth::tfa" />
  70. </resources>
  71. </route>
  72. <route url="/V1/msp-2fa/user-providers/:userId" method="PUT">
  73. <service class="\MSP\TwoFactorAuth\Api\TfaInterface" method="setProvidersCodes"/>
  74. <resources>
  75. <resource ref="MSP_TwoFactorAuth::tfa" />
  76. </resources>
  77. </route>
  78. <route url="/V1/msp-2fa/reset-provider/:userId/:providerCode" method="POST">
  79. <service class="\MSP\TwoFactorAuth\Api\TfaInterface" method="resetProviderConfig"/>
  80. <resources>
  81. <resource ref="MSP_TwoFactorAuth::tfa" />
  82. </resources>
  83. </route>
  84. </routes>