We're updating the issue view to help you get more done. 

Misleading documentation

Description

I'm trying for long time to initiate a GET request to retrieve JSON from Opencast server. From the official website authentication mechanism that was mentioned is Basic Auth, but after searing around I found that Digest Auth is the one that is used for the API which was mentioned on:

https://opencast.jira.com/wiki/display/MH/Remote+Services

I have been trying to connect to the API, but no results till now. I used cUrl and httpful, but it always give an error HTTP/1.1 401 An Authentication object was not found in the SecurityContext.

I used cUrl with php same issue, and example that is given on https://opencast.jira.com/wiki/display/MH/Remote+Services is not working at all:

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url.$uri);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_setopt($ch, CURLOPT_USERPWD, $username.':'.$password);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-Requested-Auth: Digest"));
curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-Opencast-Matterhorn-Authorization: true"));

$response = curl_exec($ch);
curl_close($ch);

return $response;

May someone tell me what is the right auth mechanism used to connect to Opencast API and how I can connect to? all trails didn't success.

Steps to reproduce

None

Status

Assignee

Lars Kiesow

Reporter

Ahmed

Criticality

None

Tags (folksonomy)

None

Time tracking

8h

Components

Fix versions

Affects versions

2.2.0

Priority

Critical