Changeset 26608 for extensions/oAuth/include
- Timestamp:
- Jan 11, 2014, 12:08:40 PM (11 years ago)
- Location:
- extensions/oAuth/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/oAuth/include/functions.inc.php
r26605 r26608 45 45 'providers' => $hybridauth_conf['providers'], 46 46 'persona_email' => @$persona_email, 47 'key' => get_ephemeral_key(0), 47 48 )); 48 49 $template->assign(array( … … 81 82 } 82 83 84 function get_servername($with_port=false) 85 { 86 $scheme = 'http'; 87 if ( (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443 ) 88 { 89 $scheme = 'https'; 90 } 91 92 $servername = $scheme . '://' . $_SERVER['HTTP_HOST']; 93 if ($with_port) 94 { 95 $servername.= ':' . $_SERVER['SERVER_PORT']; 96 } 97 98 return $servername; 99 } 100 83 101 // http://www.sitepoint.com/authenticate-users-with-mozilla-persona/ 84 102 function persona_verify() … … 93 111 ); 94 112 95 $scheme = 'http'; 96 if ( (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443 ) 97 { 98 $scheme = 'https'; 99 } 100 $audience = sprintf( 101 '%s://%s:%s', 102 $scheme, 103 $_SERVER['HTTP_HOST'], 104 $_SERVER['SERVER_PORT'] 105 ); 106 107 $params = 'assertion=' . urlencode($assert) . '&audience=' . urlencode($audience); 113 $params = 'assertion=' . urlencode($assert) . '&audience=' . urlencode(get_servername(true)); 108 114 109 115 $options = array( -
extensions/oAuth/include/providers_stats.inc.php
r26605 r26608 33 33 'label' => 'Tumblr', 34 34 'provider_name' => 'Tumblr', 35 'callback' => true, 35 36 'new_app_link' => 'http://www.tumblr.com/oauth/apps', 36 37 ), … … 38 39 'label' => 'Twitter', 39 40 'provider_name' => 'Twitter', 41 'callback' => true, 40 42 'new_app_link' => 'https://dev.twitter.com/apps', 41 43 ), -
extensions/oAuth/include/public_events.inc.php
r26605 r26608 69 69 { 70 70 $template->assign('OAUTH_USER', array( 71 'provider' => $provider,71 'provider' => 'Persona', 72 72 'username' => $user_identifier, 73 73 'u_profile' => null, … … 96 96 97 97 $template->assign('OAUTH_USER', array( 98 'provider' => $ provider,98 'provider' => $hybridauth_conf['providers'][$provider]['name'], 99 99 'username' => $remote_user->displayName, 100 100 'u_profile' => $remote_user->profileURL, … … 191 191 { 192 192 $template->assign('OAUTH_USER', array( 193 'provider' => $provider,193 'provider' => 'Persona', 194 194 'username' => $user_identifier, 195 195 'u_profile' => null, … … 206 206 207 207 $template->assign('OAUTH_USER', array( 208 'provider' => $ provider,208 'provider' => $hybridauth_conf['providers'][$provider]['name'], 209 209 'username' => $remote_user->displayName, 210 210 'u_profile' => $remote_user->profileURL,
Note: See TracChangeset
for help on using the changeset viewer.