• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Very frustrated with no idea how to check logins

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK. I admit it. After a week of trying to figure out how to check to see if an individual has permission to enter data into the DB I have no idea how to pull it off.
I have read and looked at many examples (each of which seems to be different) and tried to implement them. So far nothing works.
Is there anyone out there that can help me? Please??
At the bottom is the Java code I am currently calling.
When this code is run 'theSubj' always comes back null.
I have a file in the db users with fields
username
passwd
Here is what I have in my mysql-service.xml. It is also currently in my login-config.xml.
[xml]
<application-policy name = "EJBSecurityDomain">
<authentication>
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"

flag = "required">
<module-option name="dsJndiName">java:/MySqlDS</module-option>
<module-option name="principalsQuery">Select passwd from users where username = ?</module-option>
<!--
<module-option name="rolesQuery">Select userRoles from userroles where username=?</module-option>
-->
</login-module>
</authentication>
</application-policy>
[/xml]

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic