If you don't find an answer, please click here to post your question.
Reply
Collector
Posts: 2
Registered: ‎07-07-2016

Basic Authentication for HTTPS link

Im trying to set the User and Password for Basic Authentication how can I make this work. I am using 

VOCommonPlayer

to setup the video. I have seen setHTTPHeader and setHTTPVerifcation not sure which one to use or how to implement them for Basic Authentication. 

Ooyalan
Posts: 31
Registered: ‎06-23-2015

Re: Basic Authentication for HTTPS link

Hello,

 

I assume you are tryring to use backlot APIs using Php client and facing issue with authentication. If my assumption is correct, are your looking at the issue like below.

http://stackoverflow.com/questions/5218648/symfony-sethttpheader-doesnt-work-header-does

 

In general, i recommend using the php sdk( https://github.com/ooyala/php-v2-sdk) for developing php based clients for backlot APIs.

 

Please provide more context on the issue and help me understand the issue better to help with.Thank you!

 

Regards,

Vaidee

Collector
Posts: 2
Registered: ‎07-07-2016

Re: Basic Authentication for HTTPS link

Sorry I wasnt very clear. I am using the Android SDK to stream live video feed but the link has HTTP Basic Authentication. Using the Android SDK how can I pass the user and password credentials so that the encrypted stream can play. with the basic android player I was able to do this to make it work.

 

Map<String, String> params = new HashMap<String, String>(1);
		// encrypt Authdata
		byte[] toEncrypt = (username + ":" + password).getBytes();
		String encoded = Base64.encodeToString(toEncrypt, Base64.DEFAULT);
		final String auth = "Basic " + encoded;
		params.put("Authorization", auth);
		Log.e(TAG, "Params Encode: " + params);
		try{
			Method setVideoURIMethod = vidView.getClass().getMethod("setVideoURI", Uri.class, Map.class);
			setVideoURIMethod.invoke(vidView, Uri.parse(vidAddress), params);
		}
		catch (ReflectiveOperationException e) {
			throw new RuntimeException(e);
		}

How can I do the same?

 

https://apidocs.ooyala.com/android_mobilesdk/classcom_1_1ooyala_1_1android_1_1visualon_1_1_visual_on...

Highlighted
Ooyalan
Posts: 31
Registered: ‎06-23-2015

Re: Basic Authentication for HTTPS link

Hello,

 

I am still not sure on this issue. sorry. 

Below doc has the way to implement authentication for content protection.

http://support.ooyala.com/developers/documentation/concepts/contentprotection_types_authorization.ht...

 

1.) What is the exception or error that you are facing in your sample app?

2.) Do you mean the Ooyala basic player sample by saying 'basic android player'?

 

I also, recommend contacting Ooyala technical support(http://support.ooyala.com/contact) with the sdk that you have used or deeper investigation. Thank you!

 

Regards,

Vaidee