Attempts to obtain permission to locate the current Veriplace user, if that permission isn't already present in the current state.

Namespace:  Veriplace.Web
Assembly:  Veriplace.Client (in Veriplace.Client.dll) Version: 1.7.0.25986 (1.7.0.0)

Syntax

C#
public void RequireGetLocationPermission()
Visual Basic (Declaration)
Public Sub RequireGetLocationPermission
Visual C++
public:
void RequireGetLocationPermission()

Remarks

If you haven't already identified the user using RequireUser()()() or set the User property, then this calls RequireUser()()() first.

If this method returns with no exceptions, permission is now available. You can get the permission token from GetLocationPermissionToken, if you need to save it for future reuse.

Either the user discovery step or the permission step may cause a redirect to the Veriplace site. When Veriplace redirects back to your application, it will be to the same URL and with the same HTTP parameters as the initial request, but with an additional token to indicate that the permission is now available. You do not need to check for this token; just call RequireGetLocationPermission()()() as you did before, and this time the method will return normally.

The Veriplace instance maintains a token cache containing the last known valid permission token for each user, which it will try to reuse if you call RequireLocation()()(). However, it will not use this cache if you call RequireGetLocationPermission separately from requireLocation, because the token might have expired and there would be no way to know this if you didn't go on to actually request a location. Therefore, RequireGetLocationPermission always asks the Veriplace server for a current permission.

Exceptions

ExceptionCondition
Veriplace.Web..::.RespondedExceptionif the client has sent a redirect response; stop handling the request and return in this case
Veriplace.Client..::.UserDiscoveryExceptionif the user discovery request failed
Veriplace.Client..::.GetLocationNotPermittedExceptionif the permission request was denied
Veriplace.Client..::.UnexpectedExceptionif there was an unexpected I/O error or OAuth error from the server

See Also