turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Bachelder <cho...@chowda.net>
Subject RE: Reading all data in ReadData Hash
Date Thu, 18 Oct 2001 15:40:53 GMT
Unfortunately I have not attempted to add things to a context from within an action.. Is there
a specific reason you need to add it there instead of in the .java piece of the screen that
renders after a login happens? or you could do.

$data.getUser().getPassword().substring(0, 3)

in your template... hope that helps.. or maybe someone who knows more than me can add something...


On Thu, 18 October 2001, "Lang, Cliff" wrote:

> 
> I am using tdk-2.1, and working with the FluxLogin.java action.  When
> the user logs on, I pull the encrypted password from the User object,
> obtain the salt, then I want to have this data available on the
> subsequent pages.  Something like:
> 
>             Crypt crypt = new Crypt();
>             user = TurbineSecurity.getUser(username);
>             String mysalt = user.getPassword().substring(0, 3);
>             if(mysalt == null) mysalt = "mysalt is NULL";
>             context.put("mysalt",mysalt);
>             String encryptedPassword = Crypt.crypt(mysalt, password);
>             user = TurbineSecurity.getAuthenticatedUser( username,
> encryptedPassword );
> 
> 
> 
> I am using my Crypt function to maintain backward compatibility, as this
> db is used by other apps.  I ran into the display or context problem
> when trying to see the salt value.
> 
> How do you push information into the session, so it is available in all
> pages/templates etc....?  (I know I don't need my salt everywhere, but
> it is the concept that I am looking for)
> 
> Thanks,  Cliff
> 
> 
> -----Original Message-----
> From: Dan Bachelder [mailto:chowda@chowda.net] 
> Sent: Thursday, October 18, 2001 9:17 AM
> To: turbine-user@jakarta.apache.org
> Subject: Re: Reading all data in ReadData Hash
> 
> 
> I do believe setMessage is per request...
> 
> RunData does not have anything to do with your context. but you can get
> the response hash out of RunData with .getParmeters().
> 
> context is also per request.. so you will only have access to $key in
> the screen which you add it.. unless you have made a pull tool or
> something... could you give more code examples of what you are doing so
> we can have a better idea of how to help you?
> 
> On Thu, 18 October 2001, "Lang, Cliff" wrote:
> 
> > 
> > Is there an easy way to read all the key/entries in the RunData hash 
> > table?
> > 
> > I am adding data via context.put("key",data), but I can't access it in
> 
> > my templates via $key reference.
> > 
> > I have also tried to use the set/get Message, but I am not seeing 
> > those changes either.  How long (number of screens) does a 
> > setMessage() stay around?  Is it request level?
> > 
> > 
> > TIA,  Cliff
> > Senior Unix Admin
> > Java newbee
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 
> </dan>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

</dan>

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Mime
View raw message