Skip to content

Commit

Permalink
fixes missing request data
Browse files Browse the repository at this point in the history
  • Loading branch information
Tustin committed Aug 1, 2018
1 parent 03ffaae commit a829882
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions include/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ class Auth
"password" => null,
"client_id" => "ebee17ac-99fd-487c-9b1e-18ef50c39ab5",
);

//GET data for the X-NP-GRANT-CODE
private $code_request = array(
"state" => "06d7AuZpOmJAwYYOWmVU63OMY",
"duid" => "0000000d00040080027BC1C3FBB84112BFC9A4300A78E96A",
"app_context" => "inapp_ios",
"client_id" => "ebee17ac-99fd-487c-9b1e-18ef50c39ab5",
"scope" => "kamaji:get_players_met kamaji:get_account_hash kamaji:activity_feed_submit_feed_story kamaji:activity_feed_internal_feed_submit_story kamaji:activity_feed_get_news_feed kamaji:communities kamaji:game_list kamaji:ugc:distributor oauth:manage_device_usercodes psn:sceapp user:account.profile.get user:account.attributes.validate user:account.settings.privacy.get kamaji:activity_feed_set_feed_privacy kamaji:satchel kamaji:satchel_delete user:account.profile.update",
"response_type" => "code",
"redirect_uri" => "com.playstation.PlayStationApp://redirect"
);

//POST data for the oauth token
private $oauth_request = array(
Expand All @@ -30,17 +41,8 @@ class Auth
"code" => null,
"duid" => "0000000d00040080027BC1C3FBB84112BFC9A4300A78E96A",
"grant_type" => "authorization_code",
"scope" => "kamaji:get_players_met kamaji:get_account_hash kamaji:activity_feed_submit_feed_story kamaji:activity_feed_internal_feed_submit_story kamaji:activity_feed_get_news_feed kamaji:communities kamaji:game_list kamaji:ugc:distributor oauth:manage_device_usercodes psn:sceapp user:account.profile.get user:account.attributes.validate user:account.settings.privacy.get kamaji:activity_feed_set_feed_privacy kamaji:satchel kamaji:satchel_delete user:account.profile.update"
);

//GET data for the X-NP-GRANT-CODE
private $code_request = array(
"state" => "06d7AuZpOmJAwYYOWmVU63OMY",
"duid" => "0000000d00040080027BC1C3FBB84112BFC9A4300A78E96A",
"app_context" => "inapp_ios",
"client_id" => "ebee17ac-99fd-487c-9b1e-18ef50c39ab5",
"scope" => "kamaji:get_players_met kamaji:get_account_hash kamaji:activity_feed_submit_feed_story kamaji:activity_feed_internal_feed_submit_story kamaji:activity_feed_get_news_feed kamaji:communities kamaji:game_list kamaji:ugc:distributor oauth:manage_device_usercodes psn:sceapp user:account.profile.get user:account.attributes.validate user:account.settings.privacy.get kamaji:activity_feed_set_feed_privacy kamaji:satchel kamaji:satchel_delete user:account.profile.update",
"response_type" => "code"
"redirect_uri" => "com.playstation.PlayStationApp://redirect"
);

//POST data for the refresh oauth token (allows user to stay signed in without entering info again (assuming you've kept the refresh token))
Expand Down Expand Up @@ -70,7 +72,7 @@ public function __construct($email, $password, $ticket = "", $code = "")
$this->two_factor_auth_request['ticket_uuid'] = $ticket;
$this->two_factor_auth_request['code'] = $code;

//Throws a AuthException if any form of authentication has failed
// Throws a AuthException if any form of authentication has failed.
if (!$this->GrabNPSSO() || !$this->GrabCode() || !$this->GrabOAuth())
{
throw new AuthException($this->last_error);
Expand Down

0 comments on commit a829882

Please sign in to comment.