@@ -52,21 +52,21 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | switch($src) |
| 54 | 54 | { |
| 55 | - case 'google': |
|
| 56 | - doAuthByType('Auth\GoogleAuthenticator', $src, $auth, $ref); |
|
| 57 | - break; |
|
| 58 | - case 'twitter': |
|
| 59 | - $twitter = $auth->getMethodByName('Auth\TwitterAuthenticator'); |
|
| 60 | - if(!isset($_GET['oauth_token']) || !isset($_GET['oauth_verifier'])) |
|
| 61 | - { |
|
| 62 | - $twitter->redirect(); |
|
| 63 | - die(); |
|
| 64 | - } |
|
| 65 | - else |
|
| 66 | - { |
|
| 67 | - $twitter->authenticate($_GET['oauth_token'], $_GET['oauth_verifier'], $current_user); |
|
| 68 | - switch($res) |
|
| 55 | + case 'google': |
|
| 56 | + doAuthByType('Auth\GoogleAuthenticator', $src, $auth, $ref); |
|
| 57 | + break; |
|
| 58 | + case 'twitter': |
|
| 59 | + $twitter = $auth->getMethodByName('Auth\TwitterAuthenticator'); |
|
| 60 | + if(!isset($_GET['oauth_token']) || !isset($_GET['oauth_verifier'])) |
|
| 61 | + { |
|
| 62 | + $twitter->redirect(); |
|
| 63 | + die(); |
|
| 64 | + } |
|
| 65 | + else |
|
| 69 | 66 | { |
| 67 | + $twitter->authenticate($_GET['oauth_token'], $_GET['oauth_verifier'], $current_user); |
|
| 68 | + switch($res) |
|
| 69 | + { |
|
| 70 | 70 | case \Auth\Authenticator::SUCCESS: |
| 71 | 71 | header('Location: '.$ref); |
| 72 | 72 | die(); |
@@ -77,15 +77,15 @@ discard block |
||
| 77 | 77 | case \Auth\Authenticator::ALREADY_PRESENT: |
| 78 | 78 | header('Location: user_exists.php?src=twitter&uid='.$current_user->uid); |
| 79 | 79 | die(); |
| 80 | - } |
|
| 80 | + } |
|
| 81 | 81 | } |
| 82 | 82 | break; |
| 83 | - case 'gitlab': |
|
| 84 | - doAuthByType('Auth\OAuth2\GitLabAuthenticator', $src, $auth, $ref); |
|
| 85 | - break; |
|
| 86 | - //Generic OAuth... |
|
| 87 | - default: |
|
| 88 | - print_r($_SERVER); |
|
| 89 | - break; |
|
| 83 | + case 'gitlab': |
|
| 84 | + doAuthByType('Auth\OAuth2\GitLabAuthenticator', $src, $auth, $ref); |
|
| 85 | + break; |
|
| 86 | + //Generic OAuth... |
|
| 87 | + default: |
|
| 88 | + print_r($_SERVER); |
|
| 89 | + break; |
|
| 90 | 90 | } |
| 91 | 91 | /* vim: set tabstop=4 shiftwidth=4 expandtab: */ |