DataSourceUserManager caches table with users and passwords
Hello, I use the DataSourceUserManager to check usernames and passwords on my site. I have a jsp page on my site that allows the users to change their password in the database. The problem is this: it seems that Orion caches the table, so when a user changes his password the old one stays active until I restart the orion server. Is there a way to do one of the following: - disable the caching - set an expiration date on the cache - make the DataSourceUserManager do an extra lookup if the given password seems to be wrong. Thanks -- Jurgen Schepers Bricsnet Koning Albertlaan 165 B-9000 Gent
Re: DataSourceUserManager caches table with users and passwords
At 11:47 27.10.00 , you wrote: Hello, I use the DataSourceUserManager to check usernames and passwords on my site. I have a jsp page on my site that allows the users to change their password in the database. The problem is this: it seems that Orion caches the table, so when a user changes his password the old one stays active until I restart the orion server. Is there a way to do one of the following: - disable the caching - set an expiration date on the cache yes but it's undocumented. I quote: + Already there (but not documented, not in a zip-released version). From the + javadocs of the next documentation zip: "staleness - time in milliseconds that + a fetched set of user info is valid (how long until it has to be refetched), + the default is -1 (forever).". That is a property of the DataSourceUserManager. HTH, robert - make the DataSourceUserManager do an extra lookup if the given password seems to be wrong. Thanks -- Jurgen Schepers Bricsnet Koning Albertlaan 165 B-9000 Gent (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
Re: DataSourceUserManager caches table with users and passwords
The preferred way of changing the password is to use the RoleManager. Example (change bob's password to cheese): - RoleManager roleManager = (RoleManager)context.lookup("java:comp/RoleManager"); User user = (User)roleManager.getPrincipal("bob"); user.setPassword("cheese"); roleManager.store(); - See http://www.orionserver.com/docs/api/ for docs on RoleManager. Briefly, it's job is to provide an interface to the current UserManager for the developer to work with. -Joe Walnes At 10:47 27/10/2000, you wrote: Hello, I use the DataSourceUserManager to check usernames and passwords on my site. I have a jsp page on my site that allows the users to change their password in the database. The problem is this: it seems that Orion caches the table, so when a user changes his password the old one stays active until I restart the orion server. Is there a way to do one of the following: - disable the caching - set an expiration date on the cache - make the DataSourceUserManager do an extra lookup if the given password seems to be wrong. Thanks -- Jurgen Schepers Bricsnet Koning Albertlaan 165 B-9000 Gent