Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

EJB Security: Not getting correct name in Principal

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am trying out to implement security in EJB3, with stand alone client. Here is the code.

Client



LoginModule




CallbackHandler



Bean method



When I print "name" property of principal in bean, I am not getting the name I had set in the NameCallback. Is there any flaw in this implementation? I am having this doubt because I am not prompting for userName and password in callback handler. Instead I am directly passing userName and password in the constructor. Is this implementation legal? I have done this because, I want to integrate this in the servlet later. I am not using J2EE authentication in the web layer and I need to use EJB security.

Waiting for some help. Thanks in advance.
 
Vish Shukla
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to integrate authentication to EJB quickly. Can someone please explain how and when Principal is set before EJB method is called? I read in many of the books but didn't find appropriate explanation any where..

Please help...

 
I suggest huckleberry pie. But the only thing on the gluten free menu is this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic