{"id":1199,"date":"2020-11-09T04:56:51","date_gmt":"2020-11-09T04:56:51","guid":{"rendered":"https:\/\/demo.securemetric.com\/docs\/?page_id=1199"},"modified":"2021-08-05T06:15:27","modified_gmt":"2021-08-05T14:15:27","slug":"qr-code-authentication-api","status":"publish","type":"page","link":"https:\/\/console.centagatecloud.com\/docs\/?page_id=1199","title":{"rendered":"QR Code Authentication API"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1199\" class=\"elementor elementor-1199\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ad798c7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ad798c7\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-882eb70\" data-id=\"882eb70\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-05b4d44 elementor-widget elementor-widget-spacer\" data-id=\"05b4d44\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-8ca125a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"8ca125a\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b647a0c\" data-id=\"b647a0c\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-10f9525 elementor-widget elementor-widget-heading\" data-id=\"10f9525\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">QR Code Authentication API<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4b733a0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4b733a0\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4c6554b\" data-id=\"4c6554b\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6f7b24d elementor-widget elementor-widget-text-editor\" data-id=\"6f7b24d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p>Authentication function that verify username and QR. User has to request a QR code before call this function. You have to convert the QR code value to a QR and display on the screen to let user scans it.<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-994a875 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"994a875\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ab87a6d\" data-id=\"ab87a6d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1c52045 elementor-widget elementor-widget-text-editor\" data-id=\"1c52045\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p>Below is the URL to access the API functions:<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-681af03 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"681af03\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d677c58\" data-id=\"d677c58\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-023d617 elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"023d617\" data-element_type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<pre class='theme-twilight' data-show-toolbar='yes'><code class='language-http'>POST \/v2\/CentagateWS\/webresources\/auth\/authQrCode<\/code><\/pre>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-90b6f92 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"90b6f92\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-afb1823\" data-id=\"afb1823\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-15325c5 elementor-widget elementor-widget-heading\" data-id=\"15325c5\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Parameters<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f1991fa elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f1991fa\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-13ca475\" data-id=\"13ca475\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8b14aed elementor-widget elementor-widget-htmega-datatable-addons\" data-id=\"8b14aed\" data-element_type=\"widget\" data-widget_type=\"htmega-datatable-addons.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t        <div class=\"htmega-table-style htmega-table-style-2 htb-table-responsive\">\r\n            <table class=\"htb-table \">\r\n                                    <thead>\r\n                        <tr>\r\n                            <th class='elementor-repeater-item-5e9cf05'>No<\/th><th class='elementor-repeater-item-d584664'>Parameter<\/th><th class='elementor-repeater-item-5759f7b'>Occurence<\/th><th class='elementor-repeater-item-43feff8'>Descriptions<\/th>                        <\/tr>\r\n                    <\/thead>\r\n                                <tbody>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-49e32b9\" >1<\/td><td class=\"elementor-repeater-item-88270cf\" >username<\/td><td class=\"elementor-repeater-item-f915b67\" >required<\/td><td class=\"elementor-repeater-item-8f71a80\" >Register Username in CENTAGATE Cloud<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-f7d930d\" >2<\/td><td class=\"elementor-repeater-item-d459d86\" >devAccId<\/td><td class=\"elementor-repeater-item-64bade8\" >Required<\/td><td class=\"elementor-repeater-item-9bedea5\" >Device that registered with the user<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-fee065a\" >3<\/td><td class=\"elementor-repeater-item-43f9c32\" >tokenId<\/td><td class=\"elementor-repeater-item-95572e5\" >Optional<\/td><td class=\"elementor-repeater-item-56e2fb0\" >Token Id registered with the device<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-1d80f07\" >4<\/td><td class=\"elementor-repeater-item-e877490\" >OtpType<\/td><td class=\"elementor-repeater-item-f239520\" >Required<\/td><td class=\"elementor-repeater-item-7ca442c\" >The OTP type<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-3ab2ee3\" >5<\/td><td class=\"elementor-repeater-item-a47090c\" >otp<\/td><td class=\"elementor-repeater-item-8091043\" >Required<\/td><td class=\"elementor-repeater-item-9f19fb7\" >OTP generate after scan Qr Code using CENTAGATE Cloud App in offline mode<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-17c7c2a\" >6<\/td><td class=\"elementor-repeater-item-480d22b\" >challenge<\/td><td class=\"elementor-repeater-item-6abe3a6\" >required<\/td><td class=\"elementor-repeater-item-0642564\" >The OTP challenge in response object<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-18491f3\" >7<\/td><td class=\"elementor-repeater-item-6c45959\" >details<\/td><td class=\"elementor-repeater-item-a438cda\" >Required<\/td><td class=\"elementor-repeater-item-2d1a07c\" >The transaction information based on requested QR code encoded using Base64. Format: -<account ID> -<request ID> -<details> Alternatively, the information is returned as plainText during QR code request.<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-3a83ebc\" >8<\/td><td class=\"elementor-repeater-item-c255578\" >AuthToken<\/td><td class=\"elementor-repeater-item-6baae32\" >Required<\/td><td class=\"elementor-repeater-item-1a64816\" >The previous generated Auth Token during request Qr Code<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-2ba44c0\" >9<\/td><td class=\"elementor-repeater-item-860c453\" >unixTimeStamp<\/td><td class=\"elementor-repeater-item-efb1f88\" >Required<\/td><td class=\"elementor-repeater-item-90cc23f\" >Current Time in UnixTimestamp<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-c330282\" >10<\/td><td class=\"elementor-repeater-item-bc30687\" >supportFido<\/td><td class=\"elementor-repeater-item-f2b3ad1\" >Required<\/td><td class=\"elementor-repeater-item-254b14d\" >FIDO Authentication Option, Pass True To Enable And False To Disable. Or Leave It Empty<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-aed7116\" >11<\/td><td class=\"elementor-repeater-item-c3b980e\" >ipAddress<\/td><td class=\"elementor-repeater-item-a253c79\" >Optional<\/td><td class=\"elementor-repeater-item-75df762\" >The IP address from where the authentication request is originated<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-dbf1de0\" >12<\/td><td class=\"elementor-repeater-item-c647516\" >browserFp<\/td><td class=\"elementor-repeater-item-570ef89\" >Optional<\/td><td class=\"elementor-repeater-item-fd02ecd\" >Browser Fingerprint<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-d830225\" >13<\/td><td class=\"elementor-repeater-item-b66540d\" >userAgent<\/td><td class=\"elementor-repeater-item-d3406aa\" >Optional<\/td><td class=\"elementor-repeater-item-4a98165\" >Platform Information of Authentication Request is Made of<\/td>                        <\/tr>\r\n                                            <tr>\r\n                            <td class=\"elementor-repeater-item-402fb9b\" >14<\/td><td class=\"elementor-repeater-item-8b7d7c3\" >hmac<\/td><td class=\"elementor-repeater-item-8bcda28\" >Required<\/td><td class=\"elementor-repeater-item-21bb3a4\" >Hmac Generated From Combination (username + devAccId + otp + challenge + details + integrationKey + unixTimeStamp + authToken + supportFido + ipAddress + browserFp + userAgent) Using Secretkey (Can Be Obtained From The App Page) As The Key\u200b<\/td>                        <\/tr>\r\n                                    <\/tbody>\r\n            <\/table>\r\n        <\/div>\r\n        \t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6e4ffdb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6e4ffdb\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b37c55e\" data-id=\"b37c55e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-82bbbeb elementor-widget elementor-widget-spacer\" data-id=\"82bbbeb\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5bb1d8a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5bb1d8a\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8d4264b\" data-id=\"8d4264b\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-cc793c3 elementor-widget elementor-widget-heading\" data-id=\"cc793c3\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-xl\">Sample Code<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1f643ec elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1f643ec\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9596b87\" data-id=\"9596b87\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f1b3c2f elementor-widget elementor-widget-text-editor\" data-id=\"f1b3c2f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p>As in below there are some examples of source code of access the API functions:<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7e8ef88 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7e8ef88\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ce91469\" data-id=\"ce91469\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b7e49a0 elementor-tabs-view-horizontal elementor-widget elementor-widget-tabs\" data-id=\"b7e49a0\" data-element_type=\"widget\" data-widget_type=\"tabs.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-tabs\">\n\t\t\t<div class=\"elementor-tabs-wrapper\" role=\"tablist\" >\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-1921\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"true\" data-tab=\"1\" role=\"tab\" tabindex=\"0\" aria-controls=\"elementor-tab-content-1921\" aria-expanded=\"false\"><a href=\"\">Java<\/a><\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-1922\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"2\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-1922\" aria-expanded=\"false\"><a href=\"\">Node Js<\/a><\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-1923\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"3\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-1923\" aria-expanded=\"false\"><a href=\"\">PHP<\/a><\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t<div class=\"elementor-tabs-content-wrapper\" role=\"tablist\" aria-orientation=\"vertical\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"true\" data-tab=\"1\" role=\"tab\" tabindex=\"0\" aria-controls=\"elementor-tab-content-1921\" aria-expanded=\"false\">Java<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-1921\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"1\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-1921\" tabindex=\"0\" hidden=\"false\"><p>\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3776\" class=\"elementor elementor-3776\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1bd49b0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1bd49b0\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bcf817f\" data-id=\"bcf817f\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b12bf22 elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"b12bf22\" data-element_type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<pre class='line-numbers theme-tomorrow-night' data-show-toolbar='yes'><code class='language-java'>public static void main(String[] args) {\r\n\r\n\tClientConfig config = new DefaultClientConfig ();\r\n\tClient client = Client.create ( config );\r\n\tWebResource service = client.resource (&quot;https:\/\/&lt;domain_name&gt;\/v2\/CentagateWS\/webresources&quot;);\r\n\t\t\t\r\n\tGson gson = new Gson();\r\n\t\t\t\r\n\tString hmac = convertHmacSha256(&quot;secretkey&quot;,&quot;username&quot; + &quot;devAccId&quot; + &quot;otp&quot; + &quot;challenge&quot; + &quot;details&quot; + &quot;authToken&quot; + &quot;integrationKey&quot; + &quot;unixTimestamp&quot; + &quot;supportFido&quot; + &quot;ipAddress&quot; + &quot;userAgent&quot; + &quot;browserFp&quot;);\r\n\r\n\tHashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();\r\n\tmap.put(&quot;username&quot;, &quot;username&quot;);\r\n\tmap.put(&quot;devAccId&quot;, &quot;devAccId&quot;);\r\n\tmap.put(&quot;tokenId&quot;, &quot;tokenId&quot;);\r\n    map.put(&quot;OtpType&quot;, &quot;online&quot;);\r\n\tmap.put(&quot;otp&quot;, &quot;otp&quot;);\r\n\tmap.put(&quot;challenge&quot;, &quot;challenge&quot;);\r\n\tmap.put(&quot;details&quot;, &quot;details&quot;);\r\n\tmap.put(&quot;authToken&quot;, &quot;authToken&quot;);\r\n\tmap.put(&quot;integrationKey&quot;, &quot;integrationKey&quot;);\r\n\tmap.put(&quot;unixTimestamp&quot;, &quot;unixTimeStamp&quot;);\r\n\tmap.put(&quot;ipAddress&quot;, &quot;ipAddress&quot;); \r\n\tmap.put(&quot;userAgent&quot;, &quot;userAgent&quot;); \r\n\tmap.put(&quot;browserFp&quot;, &quot;browserFp&quot;); \r\n\tmap.put(&quot;supportFido&quot;, &quot;&quot;); \r\n\tmap.put(&quot;hmac&quot;, hmac); \r\n\r\n\tClientResponse response = service.path (&quot;auth&quot;).path(&quot;authQrCode&quot;).accept(MediaType.APPLICATION_JSON).post(ClientResponse.class, gson.toJson(map));\r\n\t\t\t\t\r\n\tString retJson = response.getEntity(String.class);\r\n\r\n\tHashMap&lt;String, Object&gt; returnData = (HashMap&lt;String, Object&gt;) gson.fromJson(retJson, HashMap.class);\r\n\r\n\tString code = returnData.get(&quot;code&quot;).toString();\r\n\tString message = returnData.get(&quot;message&quot;).toString();\r\n\tString object = returnData.get(&quot;object&quot;).toString();\r\n}\r\n\r\npublic static String convertHmacSha256(String secretKey, String params) throws NoSuchAlgorithmException, \r\n            InvalidKeyException,IllegalStateException, SignatureException, NoSuchProviderException, Exception\r\n{\r\n\ttry\r\n\t{\r\n\t\tfinal SecretKeySpec secret_key = new SecretKeySpec ( StringUtils.getBytesUtf8 ( secretKey ) , &quot;HmacSHA256&quot; );\r\n\t\tfinal Mac mac = Mac.getInstance ( &quot;HmacSHA256&quot; );\r\n\t\tmac.init ( secret_key );\r\n\t\tfinal byte[] bytes = mac.doFinal ( StringUtils.getBytesUtf8 ( params ) );\r\n\t\treturn Hex.encodeHexString ( bytes );\r\n\t}\r\n\tcatch ( NoSuchAlgorithmException e )\r\n\t{\r\n\t\tthrow new NoSuchAlgorithmException ( e );\r\n\t}\r\n\tcatch ( InvalidKeyException e )\r\n\t{\r\n\t\tthrow new InvalidKeyException ( e );\r\n\t}\r\n\tcatch ( IllegalStateException e )\r\n\t{\r\n\t\tthrow new IllegalStateException ( e );\r\n\t}\r\n\tcatch ( Exception e )\r\n\t{\r\n\t\tthrow new Exception ( e );\r\n\t}\r\n}<\/code><\/pre>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"2\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-1922\" aria-expanded=\"false\">Node Js<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-1922\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"2\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-1922\" tabindex=\"0\" hidden=\"hidden\"><p>\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3778\" class=\"elementor elementor-3778\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2b2d154 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2b2d154\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c83d3ea\" data-id=\"c83d3ea\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1ebb69f elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"1ebb69f\" data-element_type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<pre class='line-numbers theme-tomorrow-night' data-show-toolbar='yes'><code class='language-javascript'>const https = require('https')\r\n\r\nvar crypto = require('crypto');\r\nvar username = '&lt;username&gt;';\r\nvar devAccId = '&lt;devAccId&gt;';\r\nvar tokenId = '&lt;tokenId&gt;';\r\nvar OtpType = 'online';\r\nvar otp = '&lt;otp&gt;';\r\nvar challenge = '&lt;challenge&gt;';\r\nvar details = '&lt;details&gt;';\r\nvar integrationKey = '&lt;integration key&gt;';\r\n\r\nvar time = Math.round((new Date()).getTime() \/ 1000);\r\nvar unixTimestamp = time.toString();\r\nvar authToken = &quot;&lt;authToken&gt;&quot;;\r\n\r\nvar supportFido = &quot;&lt;supportFido&gt;&quot;;\r\nvar ipAddress = &quot;&lt;ipAddress&gt;&quot;;\r\nvar userAgent = &quot;&lt;userAgent&gt;&quot;;\r\nvar browserFp = &quot;&lt;browserFp&gt;&quot;;\r\n\r\nvar secretKey    = '&lt;secret key&gt;';  \r\nvar hmacText = username + devAccId + otp + challenge + details + authToken + integrationKey + unixTimestamp + supportFido + ipAddress + userAgent + browserFp;\r\nvar hash, hmac;\r\n\r\n\/* generate hmac value*\/\r\nhmac = crypto.createHmac(sha256, secretKey);    \r\nhmac.write(hmacText);\r\nhmac.end();      \r\nhash = hmac.read().toString('hex');    \r\n\r\n\r\nconst data = JSON.stringify({\r\n\tusername: username,\r\n\tdevAccId: devAccId,\r\n\ttokenId : tokenId,\r\n\tOtpType : OtpType,\r\n\totp: otp,\r\n\tchallenge: challenge,\r\n\tdetails: details,\r\n\tauthToken: authToken,\r\n\tintegrationKey: integrationKey,\r\n\tunixTimestamp: unixTimestamp,\r\n\tipAddress: ipAddress,\r\n\tsupportFido: supportFido,\r\n\tuserAgent: userAgent,\r\n\tbrowserFp: browserFp,\r\n\thmac: hash\r\n})\r\n\r\nconst options = {\r\n\thostname: &quot;&lt;domain_name&gt;&quot;,\r\n\tport: 443,\r\n\tpath:'\/v2\/CentagateWS\/webresources\/auth\/authQrCode',\r\n\tmethod: 'POST',\r\n\theaders: {\r\n\t\t'Accept': 'application\/json',\r\n\t\t'Content-Type': 'application\/json',\r\n\t}\r\n}\r\n\r\nconst req = https.request(options, res =&gt;{\r\n\tconsole.log(`HTTP Status Code: ${res.statusCode}`)\r\n\tvar body = '';\r\n\tres.on('data', function(d){\r\n\t\t\r\n\tbody += d;\r\n\tvar parsed = JSON.parse(body);\r\n\t\r\n\tif (parsed.code == 0){\r\n\t   console.log('Authentication Succeed');\r\n\t   console.log('Response:');\r\n\t   console.log(body);\r\n\t}\r\n\telse {\r\n\t  console.log('Authentication Fail, ' +'Message:' + parsed.message);\r\n\t  console.log('Code:' + parsed.code); \r\n\t}\r\n\t\t\r\n\t})\r\n})\r\n\r\nreq.on('ERROR', error =&gt; {\r\n\tconsole.error(error)\r\n})\r\n\r\nreq.write(data)\r\nreq.end()<\/code><\/pre>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"3\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-1923\" aria-expanded=\"false\">PHP<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-1923\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"3\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-1923\" tabindex=\"0\" hidden=\"hidden\"><p>\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3780\" class=\"elementor elementor-3780\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-10a4513 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"10a4513\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-41b2a37\" data-id=\"41b2a37\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-379144c elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"379144c\" data-element_type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<pre class='line-numbers theme-tomorrow-night' data-show-toolbar='yes'><code class='language-php'>&lt;?php\r\n\r\n    $url = 'https:\/\/&lt;domain_name&gt;\/v2\/CentagateWS\/webresources\/auth\/authQrCode';\r\n    \r\n    $ch = curl_init($url);\r\n    $secretKey = &quot;&lt;secretkey&gt;&quot;;\r\n    $username =&quot;&lt;username&gt;&quot;;\r\n    $devAccId = &quot;&lt;devAccId&gt;&quot;;\r\n    $tokenId = &quot;&lt;token_Id&gt;&quot;;\r\n    $OtpType = &quot;online&quot;;\r\n    $otp = &quot;&lt;otp&gt;&quot;;\r\n    $challenge = &quot;&lt;challenge&gt;&quot;;\r\n    $details = &quot;&lt;details&gt;&quot;;\r\n    $integrationKey = &quot;&lt;integrationkey&gt;&quot;;\r\n    $time = time(); \/\/ get current timestamp\r\n    $unixTimestamp = strval($time); \/\/convert timestamp to String\r\n    $authToken = &quot;&lt;authToken&gt;&quot;;\r\n    $supportFido = &quot;&lt;supportFido&gt;&quot;;\r\n    $ipAddress = &quot;&lt;ipAddress&gt;&quot;;\r\n    $userAgent = &quot;&lt;userAgent&gt;&quot;;\r\n    $browserFp = &quot;&lt;browserFp&gt;&quot;;\r\n    \r\n    $hmac_text = $username.$devAccId.$otp.$challenge.$details.$authToken.$integrationKey.$unixTimestamp.$supportFido.$ipAddress.$userAgent.$browserFp;\r\n    $hmac = hash_hmac('sha256', $hmac_text, $secretKey); \/\/ calculate hmac value\r\n    \r\n    $jsonData = array (\r\n    \t'username'=&gt; $username,\r\n    \t'devAccId'=&gt; $devAccId,\r\n    \t'tokenId' =&gt; $tokenId,\r\n    \t'OtpType' =&gt; $OtpType,\r\n    \t'otp'=&gt; $otp,\r\n    \t'challenge'=&gt; $challenge,\r\n    \t'details'=&gt; $details,\r\n    \t'authToken'=&gt; $authToken,\r\n    \t'integrationKey'=&gt; $integrationKey,\r\n    \t'unixTimestamp'=&gt; $unixTimestamp,\r\n    \t'supportFido'=&gt; $supportFido,\r\n    \t'ipAddress'=&gt; $ipAddress,\r\n    \t'userAgent'=&gt; $userAgent,\r\n    \t'browserFp'=&gt; $browserFp,\r\n    \t'hmac' =&gt; $hmac\r\n    \t\r\n    );\r\n    \r\n    $jsonDataEncoded = json_encode($jsonData);\r\n    \r\n    curl_setopt($ch, CURLOPT_POST,1);\r\n    curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);\r\n    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application\/json','Content-Type: application\/json'));\r\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n    \r\n    $result = curl_exec($ch);\r\n    \r\n    \r\n    $obj = json_decode($result); \r\n    if ($obj-&gt;{'code'} != 0){\r\n    \tprint &quot;Authentication fail&quot;;\r\n    \tprint &quot;Message: &quot;.$obj-&gt;{'message'}; \r\n    \techo &quot; &lt;br&gt;&quot;; \r\n    \tprint &quot;Code: &quot;.$obj-&gt;{'code'};\r\n    }\r\n    else {\r\n    \tprint &quot;Authentication succeed&quot;;\r\n    \techo &quot; &lt;br&gt;&quot;; \r\n    \tprint &quot;Message: &quot;.$obj-&gt;{'message'}; \r\n    \techo &quot; &lt;br&gt;&quot;; \r\n    \tprint &quot;Code: &quot;.$obj-&gt;{'code'}; \r\n    \techo &quot; &lt;br&gt;&quot;; \r\n    \tprint &quot;Result:&quot; ;\r\n    \techo &quot; &lt;br&gt;&quot;; \r\n    \tprint $result;\r\n    }\r\n    \r\n    curl_close($ch);\r\n\r\n?&gt;<\/code><\/pre>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/p><\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>QR Code Authentication API Authentication function that verify username and QR. User has to request a QR code before call this function. You have to convert the QR code value to a QR and display on the screen to let user scans it. Below is the URL to access the API functions: POST \/v2\/CentagateWS\/webresources\/auth\/authQrCode Parameters [&hellip;]<\/p>\n<a class=\"read-more-tag\" \n         href=\"https:\/\/console.centagatecloud.com\/docs\/?page_id=1199\">&nbsp;Read More<\/a>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/pages\/1199"}],"collection":[{"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1199"}],"version-history":[{"count":35,"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/pages\/1199\/revisions"}],"predecessor-version":[{"id":5547,"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=\/wp\/v2\/pages\/1199\/revisions\/5547"}],"wp:attachment":[{"href":"https:\/\/console.centagatecloud.com\/docs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}