Search code examples
javascriptjquerycordovawifi

Coding for enterprise level wifi networks javascript or jquery


I have done a wifi application using javascript or jquery. This application only supports personal WPA or WPA2 networks which is also the home level networks which has only password validation. Now my question is how can I write the coding for an enterprise level wifi networks where you have validations like username, identity, and password. So please someone give me suggestions or ideas.Thank u.

I have did the home level wifi application using javascript,jquery and cordova-plugin-wifiwizard.


Solution

  • For this you have to create the web service which will be in enterprise and server, take example

    You have to do ajax call from java-script or jquery(Restful type webservice I am using here)

    $.ajax({
                type: 'POST',
                url: " http://localhost:8080/service-name",
                data: JSON.stringify({}),
                beforeSend: function(xhr) {
                    xhr.setRequestHeader("Accept", "application/json");
                    xhr.setRequestHeader("Content-Type", "application/json");
                },
    
                success: function(data) {
    
                        *code*
    
                 }
    
    
                },
                error: function(data, status, er) {
    
                    alert("Something went wrong! Please contact your Administrator.");
                }
    

    This will connect to your web-service which is in the server and that server will connect to your database, store necessary information with table like password and username. The main thing in this you have to do all validation stuff in web-service(enterprise code). Read web services tutorial to achieve this https://spring.io/guides/gs/consuming-rest-jquery/