Push authorization via client device mobile application.
Java 1.6 or later.
You'll need to manually install the following JAR:
-
Download JAR
-
Open IDE
-
File - Project Structure - Libraries - "+" - Choose PushAuth.jar.
Please see the PushAuth API docs for the most up-to-date documentation.
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());
}
}
}
PushAuth push = new PushAuth("public key", "private key");
And waiting responce from client:
push.setAddress("client@yourfirm.com");
push.setModeType("push");
push.setFlashResponse(false);
Or without client response:
push.setAddress("client@yourfirm.com");
push.setModeType("push");
push.setFlashResponse(true);
And waiting responce from client:
push.setAddress("client@yourfirm.com");
push.setModeType("code");
push.setCode("213");
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());
}
Please see: https://dashboard.pushauth.io/api/index.html
Please see: https://dashboard.pushauth.io/support/request/create