Trusted Authentication support

Created on 24 November 2013, about 11 years ago
Updated 29 May 2024, 7 months ago

This might be pie in the sky, but support for trusted authentication would be superb. Here is an example implementation based on Tableau sample embed docs:


// http://onlinehelp.tableausoftware.com/v8.1/server/en-us/trusted_auth_webURL.htm

$user = "admin";
$server = "tableauserver.example.com";
$view_url = "t/siteX/views/workbookX/dashboardX";
$site = "siteX";

//
function get_trusted_url($user, $server, $view_url, $site) {
  $params = ':embed=yes&:toolbar=yes';
  $ticket = get_trusted_ticket($server, $user, $_SERVER['REMOTE_ADDR'], $site);
  
  return "http://$server/trusted/$ticket/$view_url?$params";
}

// Note that this function requires the pecl_http extension. 
// See: http://pecl.php.net/package/pecl_http

// the client_ip parameter isn't necessary to send in the POST unless you have
// wgserver.extended_trusted_ip_checking enabled (it's disabled by default)
function get_trusted_ticket($wgserver, $user, $remote_addr, $site) {
  $params = array(
    'username' => $user,
    'client_ip' => $remote_addr,
    'target_site' => $site
  );

  return http_parse_message(http_post_fields("http://$wgserver/trusted", $params))->body;
}

<iframe src="<?php echo get_trusted_url($user,$server,$view_url,$site);?>" style="width:1090px; height: 793px; border: none;"></iframe>

✨ Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mrP

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024