Class Veriplace_PermissionAPI

Description

Interface for verifying or removing an application's permissions for specific resources in the Veriplace platform.

These are direct requests to the Veriplace server, and can be used without user interaction and without a web front-end.

The verify() and delete() methods operate on specific OAuth Access Tokens, representing permissions to locate specific users. An application may wish to verify an Access Token if it was previously cached, because users may have changed their privacy settings so that the token is no longer valid and location requests will fail; in this case the application may choose to restart the OAuth User Authorization process to obtain a new token. An application can also delete the Access Token that it previously used to locate a user; this has the same effect as the user revoking permission for that application through the Veriplace website.

The verifyCarrierLocatability() method does not check whether the application has permission to locate the user, but whether it can ever have permission, based on whether the given mobile number is on a mobile carrier that is supported by Veriplace and authorized for the application.

Located in /Veriplace/Client.php (line 1363)

Veriplace_API
   |
   --Veriplace_PermissionAPI
Method Summary
 void delete (Veriplace_Token $accessToken)
 boolean verify (Veriplace_Token $accessToken)
 boolean verifyCarrierLocatability (string $mobileNumber)
Methods
delete (line 1391)

Remove an access token, so the application will no longer have permission to locate that user.

  • throws: Veriplace_UnexpectedException if there was an unexpected I/O error or OAuth error
  • throws: Veriplace_UnknownTokenException if the token was not valid
  • access: public
void delete (Veriplace_Token $accessToken)
verify (line 1372)

Verify an access token.

  • return: True if the access token is valid.
  • throws: Veriplace_UnexpectedException if there was an unexpected I/O error or OAuth error
  • access: public
boolean verify (Veriplace_Token $accessToken)
verifyCarrierLocatability (line 1432)

Verify that a mobile number is theoretically accessible by this application, based only on its mobile carrier and the application's launch status. If this method returns false, then a user with that mobile number would not be able to grant location permission to your application.

Even if the number does not have a registered Veriplace account, Veriplace can determine whether it is a valid number belonging to a supported carrier. If your application has been launched, it may only be certified for certain carriers and not for others.

If your application is still in development and has not been certified for any carrier, then the only mobile numbers that are allowed are the ones you have designated as test phones on the Veriplace Developer Portal (subject to the user's approval: users of those phones can still choose to opt out of "developer mode", in which case they will be unavailable to your application).

If this method returns true, it does not mean that your application can locate the user; you still need to have the user's permission. To check for an existing permission token, use Veriplace_GetLocationAPI::getLocationAccessToken(). To ask for permission interactively in a web application using an OAuth redirect, use Veriplace_GetLocationAPI::getAuthorizationURI(). To ask for permission via an SMS messge, use Veriplace_InvitationAPI.

  • return: True if the mobile number is valid and is on a carrier that is supported for this application; false otherwise.
  • since: 1.4
  • throws: Veriplace_BadParameterException if the mobile number was not in a valid format (see Veriplace_UserDiscoveryParameters for acceptable formats)
  • throws: Veriplace_UnexpectedException if there was an unexpected I/O error or OAuth error
  • access: public
boolean verifyCarrierLocatability (string $mobileNumber)
  • string $mobileNumber: The mobile number.

Documentation generated on Sun, 29 Aug 2010 04:08:36 -0700 by phpDocumentor 1.4.1