CyberSiARA™ | Nuxt.js

Nuxt.js Integration Guideline

1. Get your public & private key from mycybersiara.com

2. Import Js and css file in mounted() function

    <script>
  export default { name:'AppContactForm', components:{...}, mounted() {        //JS let SiaraShield = document.createElement('script') SiaraShield.setAttribute('src',
'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js'
) SiaraShieldScript.setAttribute('src',
'https://embedcdn.mycybersiara.com/CaptchaFormate/CaptchaResources.js'
) document.head.appendChild(SiaraShieldScript)        //CSS let style = document.createElement('link'); style.type = "text/css"; style.rel = "stylesheet"; style.href = document.head.appendChild(style); } ... }
</script>

3. Add where you want to display SiaraShield plugin within your page.

<div class="SiaraShield"></div>

4. Add ‘CaptchaSubmit’ class in your submit button.

<input class="CaptchaSubmit" id="submit-form" type="submit".value="...">

5. Once all these steps are done, go to your browser and refresh the page and enjoy the SiaraShield. Thank you for using SiaraShield!

1. Create method for initialized captcha on load.

        <script>
            export default{
                    name:'PageName',
                    components:{...},
                    mounted() {this.mycybersiara()},
                    methods(){
                            mycybersiara(){
                            var PublicKey = 'TEST-CYBERSIARA';
                         InitCaptcha('PublicKey');
                         $('.CaptchaSubmit').click(function (){
                    if(CheckCaptcha()){
                axios.get('https://embed.mycybersiara.com/api/validate-token',{
                    headers:{ key: 'TEST-CYBERSIARA', Authorization: `Bearer ${CyberSiaraToken}' }
                             }).then((res) =>{
                    // Please write your submit button click event function here //
                            })
                    }
                            });
                        }
                    }...
                }
                                
</script>