You are here

function opigno_lrs_stats_query_request_basic_auth_header in Opigno TinCan API 7

Generate basic auth header for the request

Parameters

string $username: Learning Record Store username to use

string $password: Learning Record Store password for the user

Return value

array A structured header option array.

1 call to opigno_lrs_stats_query_request_basic_auth_header()
opigno_lrs_stats_query in modules/opigno_tincan_api_stats/includes/model/adapter.inc
Query Learning Record Store server using mongodb aggregate structure

File

modules/opigno_tincan_api_stats/includes/model/adapter.inc, line 32
Implements functions to query statements stored on Learning Record Store server

Code

function opigno_lrs_stats_query_request_basic_auth_header($username, $password) {
  return array(
    'Authorization' => 'Basic ' . base64_encode("{$username}:{$password}"),
  );
}