Solved

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

Posted on 2014-01-02
2
587 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 35

Accepted Solution

by:
mccarl earned 250 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 250 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to get all the API from website? 11 128
JavaFX TableView not displaying correctly 3 105
Html Table Looping (part 2) 5 35
CRM 2016 Organization service not working 7 61
Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

749 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