$config->oauth->key)); exit(); break; default: break; } }else if (isset($_REQUEST["code"])){ // Mastodon callback (Authorization Code from /oauth/authorize) $MastCode = $_REQUEST["code"]; // var_dump($_REQUEST); } ?> HackersTown Server Access
"; }else{ echo ""; }?>
token_type)){ // Valid Auth? $User = verifyCredentials($Auth->access_token); if (gettype($User) == "object" && isset($User->id)) { // Congrats! $AuthToken = $Auth->access_token; $UserName = $User->display_name; $UserId = $User->id; }else{ // invalid auth $AuthToken = "BadUser"; $ErrorDesc = "User Not Found"; } }else{ // invalid auth // TODO: Replace with direct to index logout with error msg if(isset($_COOKIE["oa_retries"])){ $retries = $_COOKIE["oa_retries"]; if($retries >= 3){ $AuthToken = "BadUser"; $ErrorDesc = "Invalid OAuth"; setcookie("oa_retries", 0, time()+3600); }else{ $retries++; setcookie("oa_retries", $retries, time()+3600); $AuthToken = "BadOauthRetry"; $ErrorDesc = "Invalid OAuth Retry"; } }else{ $AuthToken = "BadOauth"; $ErrorDesc = "Invalid OAuth Retry"; setcookie("oa_retries", 1, time()+3600); } } // revoke token after usage ?>
> Invalid try again
>
>
Setup an account SSH key
>