Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to pass authentications between web services  RSS feed

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post.
We have some web services that we use them to complete a user request.
imagine that user is authenticated with first web service using dummy mechanism, now we need to send user name,.... to the other web service (running in the same server) for next oprtaion, what we do not like to do is passing them as parameter.
is there some other mechanism for it?
for example

user request come to WS1
WS1 do some operation and ask WS2 for some other results.
WS2 give back the results to WS1
WS1 send the result to user.

now i want to ask, is it a good practice that WS1 store the user pereferences into the JNDI, and pass the JNDI name to WS2 ?

I should say that all WS are stateless.

Thanks
 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, why dont you pass the authentication information in the header?
Or using one of the standard http authentication mechanism.

Read this document
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, don't forgot to see THIS.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!