Bug 440208 - Add basic auth capable OslcClient
Summary: Add basic auth capable OslcClient
Status: NEW
Alias: None
Product: Lyo
Classification: Technology
Component: Client (show other bugs)
Version: 2.1.0   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-23 07:29 EDT by Bartosz Tomasik CLA
Modified: 2014-10-21 12:33 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bartosz Tomasik CLA 2014-07-23 07:29:30 EDT
Right now there's no way to easy use basic auth, one has to extends OslcClient by itself
Comment 1 Samuel Padgett CLA 2014-10-21 12:33:09 EDT
Bartosz, it's possible to use basic auth with OSLC client today without extending it. It does require one cast to DefaultHttpClient, however.

OslcClient oslcClient = new OslcClient();
DefaultHttpClient httpClient = (DefaultHttpClient) oslcClient.getHttpClient();
httpClient.getCredentialsProvider().setCredentials(
                new AuthScope("example.com", 443),
                new UsernamePasswordCredentials("username", "password"));