protected function JanrainCaptureApi::updateCaptureSession in Janrain Registration 7
Same name and namespace in other branches
- 6 janrain_capture.api.inc \JanrainCaptureApi::updateCaptureSession()
- 7.4 includes/janrain_capture.api.inc \JanrainCaptureApi::updateCaptureSession()
- 7.2 includes/janrain_capture.api.inc \JanrainCaptureApi::updateCaptureSession()
- 7.3 includes/janrain_capture.api.inc \JanrainCaptureApi::updateCaptureSession()
Updates session variables with Capture user tokens
Parameters
string $json_data: The data received from the HTTP request containing the tokens
2 calls to JanrainCaptureApi::updateCaptureSession()
- JanrainCaptureApi::newAccessToken in ./
janrain_capture.api.inc - Perform the exchange to generate a new Access Token
- JanrainCaptureApi::refreshAccessToken in ./
janrain_capture.api.inc - Retrieves a new access_token/refresh_token set
File
- ./
janrain_capture.api.inc, line 97 - An API Client for making calls to the Janrain Capture web service.
Class
- JanrainCaptureApi
- @file An API Client for making calls to the Janrain Capture web service.
Code
protected function updateCaptureSession($json_data) {
$_SESSION['janrain_capture_access_token'] = $json_data['access_token'];
$_SESSION['janrain_capture_refresh_token'] = $this
->refreshTokenProtect($json_data['refresh_token']);
$_SESSION['janrain_capture_expires_in'] = REQUEST_TIME + $json_data['expires_in'];
$password_recover = isset($json_data['transaction_state']['capture']['password_recover']) && $json_data['transaction_state']['capture']['password_recover'] == TRUE ? TRUE : FALSE;
$_SESSION['janrain_capture_password_recover'] = $password_recover;
if (isset($json_data['transaction_state']['capture']['action'])) {
$_SESSION['janrain_capture_action'] = $json_data['transaction_state']['capture']['action'];
}
}