Solved

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

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
custom annotations 9 42
spring jars download 1 35
maven disable workspace resolution 1 21
jmss example java 2 23
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.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

861 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