Ignore:
Timestamp:
Jan 11, 2014, 12:08:40 PM (11 years ago)
Author:
mistic100
Message:

finish updating guides, fix flow issues, update language file

Location:
extensions/oAuth/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/oAuth/include/functions.inc.php

    r26605 r26608  
    4545      'providers' => $hybridauth_conf['providers'],
    4646      'persona_email' => @$persona_email,
     47      'key' => get_ephemeral_key(0),
    4748      ));
    4849    $template->assign(array(
     
    8182}
    8283
     84function 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
    83101// http://www.sitepoint.com/authenticate-users-with-mozilla-persona/
    84102function persona_verify()
     
    93111    );
    94112
    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));
    108114
    109115  $options = array(
  • extensions/oAuth/include/providers_stats.inc.php

    r26605 r26608  
    3333    'label'             => 'Tumblr',
    3434    'provider_name'     => 'Tumblr',
     35    'callback'          => true,
    3536    'new_app_link'      => 'http://www.tumblr.com/oauth/apps',
    3637  ),
     
    3839    'label'             => 'Twitter',
    3940    'provider_name'     => 'Twitter',
     41    'callback'          => true,
    4042    'new_app_link'      => 'https://dev.twitter.com/apps',
    4143  ),
  • extensions/oAuth/include/public_events.inc.php

    r26605 r26608  
    6969      {
    7070        $template->assign('OAUTH_USER', array(
    71           'provider' => $provider,
     71          'provider' => 'Persona',
    7272          'username' => $user_identifier,
    7373          'u_profile' => null,
     
    9696     
    9797        $template->assign('OAUTH_USER', array(
    98           'provider' => $provider,
     98          'provider' => $hybridauth_conf['providers'][$provider]['name'],
    9999          'username' => $remote_user->displayName,
    100100          'u_profile' => $remote_user->profileURL,
     
    191191    {
    192192      $template->assign('OAUTH_USER', array(
    193         'provider' => $provider,
     193        'provider' => 'Persona',
    194194        'username' => $user_identifier,
    195195        'u_profile' => null,
     
    206206     
    207207      $template->assign('OAUTH_USER', array(
    208         'provider' => $provider,
     208        'provider' => $hybridauth_conf['providers'][$provider]['name'],
    209209        'username' => $remote_user->displayName,
    210210        'u_profile' => $remote_user->profileURL,
Note: See TracChangeset for help on using the changeset viewer.