auth.session

Introduction

This method checks the user's session data. We recommend checking this on every page where a user token is provided. If the user is logged in, it returns their user ID, session expiry timestamp and the current site ID. If they aren't logged in, they should be logged out of your site. This implements a single-sign-off feature of NewHaze. If they sign out of NewHaze, they also sign out of other websites.

Parameters

Name Type Description

Using the PHP Library

<?php
$response
=$newhaze->api->auth_session();
?>

When using the PHP API library, this method is called when you declare the NewHaze object:

<?php
$newhaze
=new NewHaze($consumer_key,$consumer_secret);
?>
So it is not essential to make the API call if you are using the PHP library.

Sample responses

JSON

{"session":true,"uid":"44","session_expiry":"1294980975","sid":"1"}


© 2012 NewHaze   Icons by Pixel Mixer   Help