コード例 #1
0
ファイル: App.php プロジェクト: danack/githubartaxservice
 public static function notAuthorizedRoutesFunction(\FastRoute\RouteCollector $r)
 {
     $r->addRoute('GET', Route::oauthStart(), 'GithubExample\\Controller\\Controller::oauthStart');
     $r->addRoute('GET', Route::oauthConfirm(), 'GithubExample\\Controller\\Controller::oauthConfirm');
     $r->addRoute('GET', Route::oauthReturn(), 'GithubExample\\Controller\\Controller::oauthReturn');
     self::commonRoutesFunction($r);
 }
コード例 #2
0
 /**
  *
  */
 public function showScopesForm()
 {
     echo "<form action='" . Route::oauthConfirm() . "' method='get'>";
     echo "<table width='750px'>";
     foreach (GithubService::$scopeDescriptions as $scope => $description) {
         echo "<tr>";
         echo "<td valign='top'>";
         echo "<input type='checkbox' name='scopes[]' value='{$scope}'/>";
         echo "</td>";
         echo "<td valign='top'>";
         echo "{$scope}";
         echo "</td>";
         echo "<td valign='top'>";
         echo $description;
         echo "</td>";
         echo "</tr>";
     }
     echo "<tr>";
     echo "<td valign='top' colspan='2' align='right'>";
     echo "</td><td>";
     echo "<input type='submit' value='Make auth request'/>";
     echo "</td>";
     echo "</tr>";
     echo "</table>";
     echo "</form>";
 }