validateUserData($data); // Guess account name from email address, this is just a hint anyway. $data['account'] = head(explode('@', $data['email'])); $this->userData = $data; return $this; } public function retrieveUserID() { return $this->userData['email']; } public function retrieveUserEmail() { return $this->userData['email']; } public function retrieveUserAccountName() { return $this->userData['account']; } public function retrieveUserProfileImage() { // No apparent API access to Plus yet. return null; } public function retrieveUserAccountURI() { // No apparent API access to Plus yet. return null; } public function retrieveUserRealName() { return $this->userData['name']; } public function getExtraAuthParameters() { return array( 'response_type' => 'code', ); } public function getExtraTokenParameters() { return array( 'grant_type' => 'authorization_code', ); } public function decodeTokenResponse($response) { return json_decode($response, true); } }