Authenticate to the WNS

After the script inclusion and configuration (see main documentation page), the authentication step is very simple.

Obviously the script flow is your choice.


$token
= isset($_GET["token"]) ? $_GET["token"] : null; //If token request if($token !== null) {     //init the WindowsNotification Class    
$Notifier = new WindowsNotification\WindowsNotificationClass();    
$Auth = $Notifier->AuthenticateService();    
if($Auth->response_status == 200)    
{        
//Save the token on permanent support (db, file, etc.)    
}        
else    
{        
//do stuff for errors    
} }

How you can see, for authentication step is very simple.

The returned object have three attributes:

->response

->token_type

->access_token

Last edited May 15, 2015 at 3:48 PM by Andreabbondanza, version 17