Skip to content

yaroslavsnisarua/PushAuth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Push Authentication Library

Library help you here pushauth.zenlix.com.

Requirements

Java 1.6 or later.

Installation

IntelliJ IDEA

You'll need to manually install the following JAR:

  • Downolad JAR

  • Open IDE

  • File - Project Structure - Libraries - "+" - Choose PushAuth.jar.

Documentation

Please see the PushAuth API docs for the most up-to-date documentation.

Usage

PushAuthExample.java

public class PushAuthExample {
    public static void main(String[] args){
        //Setting your Public & Private keys
        PushAuth push = new PushAuth("public key", "private key");
        //Setting other params for request
        push.setAddress("client@yourfirm.com");
        push.setModeType("code");
        push.setCode("213");
        push.setFlashResponse(false);


        try{
            //Send Push request to your client device and print
            System.out.println("Request_hash:" + push.send());
            // will return Request Hash
            
            //show your client answer
            System.out.println(push.isAccept());
            // will return true/false or null if answer not received

        }catch(Exception e){
            System.out.println(e.toString());
        }

        try{
                //Show push request information
               System.out.println(push.requestStatus("PushRequestCode"));
               //return array

        }catch(Exception e){
            System.out.println(e.toString());
        }

    }
}

Packages

No packages published

Languages

  • Java 100.0%