Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to pass username/password to REST API (WS) using JBossRestEasy client (2.3.6 jar)?

Posted on 2014-01-02
2
Medium Priority
?
607 Views
Last Modified: 2014-01-22
Hi,

I have a REST API site requiring id/pw to connect.

I am using JBoss RestEasy 2.3.6 to consume above APIs.
It's clear to me what I need to do pass my id/pw for the authentication.
Can you help?

I thought I could pass id/pw through headers or something.
Do I need to create interceptor or filter?
Can you direct me to a example or something?
Thank you
0
Comment
Question by:dkim18
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Accepted Solution

by:
mccarl earned 750 total points
ID: 39752688
I have a REST API site requiring id/pw to connect
We would need more info about the above. How exactly does the remote site expect the id/pw to be presented to it? ie. is it expecting HTTP "Authentication" headers, or do you need to post the id/pw to a page and then use cookies to maintain a session, etc.
0
 
LVL 11

Assisted Solution

by:Manish
Manish earned 750 total points
ID: 39753274
Do you have format of input required to call rest api? Is it JSON or something else?
Also you can send useid/password in header depends on  backend implementation.
0

Featured Post

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as the high-speed power of the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question