Login process

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Login process

Squeak Smalltalk
Hello,

My boss wants me to create a "small site" with seaside.
Today we use rails.

So I need to start. :D  I have test some tutorials.

Can someone give me a hint how create a login process for a site ?

Login process have :
- New user registration.
- Old user login.


I hope I fix it or we need to use rails again :(

Walle.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Login process

Michael Gorsuch
> Can someone give me a hint how create a login process for a site ?
>
> Login process have :
> - New user registration.
> - Old user login.

I have been building my sites with a subclass of WATask as the root
component.  I implement the workflow in it's 'go' method.

The first task in my workflow is to build a new Welcome component
(subclass of WAComponent) and #call it.

The Welcome component has two child components that it displays during
#renderContentOn.  One child is the registration form, the other is
the login form.  When these components were initialized, I defined
onAnswer for each one, so that when they #answer, it sends it back to
Welcome, which will then #answer the original #call from my workflow.

Both of those subcomponents validate the input, and if all is well,
they #answer with a User object.  If something went wrong, the stuff
the message into an instance variable called 'errors' that is always
checked when the components are rendered.

When one of the forms suceeds, and the user object is sent back with
#answer, I then store it in my session (I subclassed WASession and
added an instance variable called 'user').

I hope that gives you a rough idea as to how something like this could work.

-
Michael Gorsuch
Styled Bits 2.0: They're Mostly Broken, But I Try
http://www.styledbits.com
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Login process

Squeak Smalltalk
thanks.
Done ;)

Walle
On 6/17/07, Michael Gorsuch <[hidden email]> wrote:

> > Can someone give me a hint how create a login process for a site ?
> >
> > Login process have :
> > - New user registration.
> > - Old user login.
>
> I have been building my sites with a subclass of WATask as the root
> component.  I implement the workflow in it's 'go' method.
>
> The first task in my workflow is to build a new Welcome component
> (subclass of WAComponent) and #call it.
>
> The Welcome component has two child components that it displays during
> #renderContentOn.  One child is the registration form, the other is
> the login form.  When these components were initialized, I defined
> onAnswer for each one, so that when they #answer, it sends it back to
> Welcome, which will then #answer the original #call from my workflow.
>
> Both of those subcomponents validate the input, and if all is well,
> they #answer with a User object.  If something went wrong, the stuff
> the message into an instance variable called 'errors' that is always
> checked when the components are rendered.
>
> When one of the forms suceeds, and the user object is sent back with
> #answer, I then store it in my session (I subclassed WASession and
> added an instance variable called 'user').
>
> I hope that gives you a rough idea as to how something like this could work.
>
> -
> Michael Gorsuch
> Styled Bits 2.0: They're Mostly Broken, But I Try
> http://www.styledbits.com
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Login process

Squeak Smalltalk
Hi,

I have some troubles with
"I then store it in my session (I subclassed WASession and
added an instance variable called 'user')."

How do you subclass WASession for storing username ?
Any hint :D

Walle

On 6/18/07, Squeak Smalltalk <[hidden email]> wrote:

> thanks.
> Done ;)
>
> Walle
> On 6/17/07, Michael Gorsuch <[hidden email]> wrote:
> > > Can someone give me a hint how create a login process for a site ?
> > >
> > > Login process have :
> > > - New user registration.
> > > - Old user login.
> >
> > I have been building my sites with a subclass of WATask as the root
> > component.  I implement the workflow in it's 'go' method.
> >
> > The first task in my workflow is to build a new Welcome component
> > (subclass of WAComponent) and #call it.
> >
> > The Welcome component has two child components that it displays during
> > #renderContentOn.  One child is the registration form, the other is
> > the login form.  When these components were initialized, I defined
> > onAnswer for each one, so that when they #answer, it sends it back to
> > Welcome, which will then #answer the original #call from my workflow.
> >
> > Both of those subcomponents validate the input, and if all is well,
> > they #answer with a User object.  If something went wrong, the stuff
> > the message into an instance variable called 'errors' that is always
> > checked when the components are rendered.
> >
> > When one of the forms suceeds, and the user object is sent back with
> > #answer, I then store it in my session (I subclassed WASession and
> > added an instance variable called 'user').
> >
> > I hope that gives you a rough idea as to how something like this could work.
> >
> > -
> > Michael Gorsuch
> > Styled Bits 2.0: They're Mostly Broken, But I Try
> > http://www.styledbits.com
> > _______________________________________________
> > Seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Login process

Michael Gorsuch
Sure, just go ahead and build a subclass of WASession, and add an
instance variable called 'user' or whatever seems appropriate.  Also
add accessors for it.

Then, reconfig the app via /seaside/config, and overide the default
session class.

After that, your components can then call 'self session user' or 'self
session user: myNewUser' to stuff things in the session object.

Make sense?

On 6/18/07, Squeak Smalltalk <[hidden email]> wrote:

> Hi,
>
> I have some troubles with
> "I then store it in my session (I subclassed WASession and
> added an instance variable called 'user')."
>
> How do you subclass WASession for storing username ?
> Any hint :D
>
> Walle
>
> On 6/18/07, Squeak Smalltalk <[hidden email]> wrote:
> > thanks.
> > Done ;)
> >
> > Walle
> > On 6/17/07, Michael Gorsuch <[hidden email]> wrote:
> > > > Can someone give me a hint how create a login process for a site ?
> > > >
> > > > Login process have :
> > > > - New user registration.
> > > > - Old user login.
> > >
> > > I have been building my sites with a subclass of WATask as the root
> > > component.  I implement the workflow in it's 'go' method.
> > >
> > > The first task in my workflow is to build a new Welcome component
> > > (subclass of WAComponent) and #call it.
> > >
> > > The Welcome component has two child components that it displays during
> > > #renderContentOn.  One child is the registration form, the other is
> > > the login form.  When these components were initialized, I defined
> > > onAnswer for each one, so that when they #answer, it sends it back to
> > > Welcome, which will then #answer the original #call from my workflow.
> > >
> > > Both of those subcomponents validate the input, and if all is well,
> > > they #answer with a User object.  If something went wrong, the stuff
> > > the message into an instance variable called 'errors' that is always
> > > checked when the components are rendered.
> > >
> > > When one of the forms suceeds, and the user object is sent back with
> > > #answer, I then store it in my session (I subclassed WASession and
> > > added an instance variable called 'user').
> > >
> > > I hope that gives you a rough idea as to how something like this could work.
> > >
> > > -
> > > Michael Gorsuch
> > > Styled Bits 2.0: They're Mostly Broken, But I Try
> > > http://www.styledbits.com
> > > _______________________________________________
> > > Seaside mailing list
> > > [hidden email]
> > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> > >
> >
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


--
Styled Bits 2.0: The Cult of Tech
http://www.styledbits.com
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Login process

Squeak Smalltalk
Thanks.

to simple for my small brain ;)
Great.

Walle
On 6/18/07, Michael Gorsuch <[hidden email]> wrote:

> Sure, just go ahead and build a subclass of WASession, and add an
> instance variable called 'user' or whatever seems appropriate.  Also
> add accessors for it.
>
> Then, reconfig the app via /seaside/config, and overide the default
> session class.
>
> After that, your components can then call 'self session user' or 'self
> session user: myNewUser' to stuff things in the session object.
>
> Make sense?
>
> On 6/18/07, Squeak Smalltalk <[hidden email]> wrote:
> > Hi,
> >
> > I have some troubles with
> > "I then store it in my session (I subclassed WASession and
> > added an instance variable called 'user')."
> >
> > How do you subclass WASession for storing username ?
> > Any hint :D
> >
> > Walle
> >
> > On 6/18/07, Squeak Smalltalk <[hidden email]> wrote:
> > > thanks.
> > > Done ;)
> > >
> > > Walle
> > > On 6/17/07, Michael Gorsuch <[hidden email]> wrote:
> > > > > Can someone give me a hint how create a login process for a site ?
> > > > >
> > > > > Login process have :
> > > > > - New user registration.
> > > > > - Old user login.
> > > >
> > > > I have been building my sites with a subclass of WATask as the root
> > > > component.  I implement the workflow in it's 'go' method.
> > > >
> > > > The first task in my workflow is to build a new Welcome component
> > > > (subclass of WAComponent) and #call it.
> > > >
> > > > The Welcome component has two child components that it displays during
> > > > #renderContentOn.  One child is the registration form, the other is
> > > > the login form.  When these components were initialized, I defined
> > > > onAnswer for each one, so that when they #answer, it sends it back to
> > > > Welcome, which will then #answer the original #call from my workflow.
> > > >
> > > > Both of those subcomponents validate the input, and if all is well,
> > > > they #answer with a User object.  If something went wrong, the stuff
> > > > the message into an instance variable called 'errors' that is always
> > > > checked when the components are rendered.
> > > >
> > > > When one of the forms suceeds, and the user object is sent back with
> > > > #answer, I then store it in my session (I subclassed WASession and
> > > > added an instance variable called 'user').
> > > >
> > > > I hope that gives you a rough idea as to how something like this could work.
> > > >
> > > > -
> > > > Michael Gorsuch
> > > > Styled Bits 2.0: They're Mostly Broken, But I Try
> > > > http://www.styledbits.com
> > > > _______________________________________________
> > > > Seaside mailing list
> > > > [hidden email]
> > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> > > >
> > >
> > _______________________________________________
> > Seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
>
> --
> Styled Bits 2.0: The Cult of Tech
> http://www.styledbits.com
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Login process

tblanchard
This is one of  those things that gets done over and over and over  
again.  It is a well known pattern.  It would be really cool if  
someone would do this once and put it on squeaksource.


On Jun 18, 2007, at 8:37 AM, Squeak Smalltalk wrote:

> Thanks.
>
> to simple for my small brain ;)
> Great.
>
> Walle
> On 6/18/07, Michael Gorsuch <[hidden email]> wrote:
>> Sure, just go ahead and build a subclass of WASession, and add an
>> instance variable called 'user' or whatever seems appropriate.  Also
>> add accessors for it.
>>
>> Then, reconfig the app via /seaside/config, and overide the default
>> session class.
>>
>> After that, your components can then call 'self session user' or  
>> 'self
>> session user: myNewUser' to stuff things in the session object.
>>
>> Make sense?
>>
>> On 6/18/07, Squeak Smalltalk <[hidden email]> wrote:
>> > Hi,
>> >
>> > I have some troubles with
>> > "I then store it in my session (I subclassed WASession and
>> > added an instance variable called 'user')."
>> >
>> > How do you subclass WASession for storing username ?
>> > Any hint :D
>> >
>> > Walle
>> >
>> > On 6/18/07, Squeak Smalltalk <[hidden email]> wrote:
>> > > thanks.
>> > > Done ;)
>> > >
>> > > Walle
>> > > On 6/17/07, Michael Gorsuch <[hidden email]> wrote:
>> > > > > Can someone give me a hint how create a login process for  
>> a site ?
>> > > > >
>> > > > > Login process have :
>> > > > > - New user registration.
>> > > > > - Old user login.
>> > > >
>> > > > I have been building my sites with a subclass of WATask as  
>> the root
>> > > > component.  I implement the workflow in it's 'go' method.
>> > > >
>> > > > The first task in my workflow is to build a new Welcome  
>> component
>> > > > (subclass of WAComponent) and #call it.
>> > > >
>> > > > The Welcome component has two child components that it  
>> displays during
>> > > > #renderContentOn.  One child is the registration form, the  
>> other is
>> > > > the login form.  When these components were initialized, I  
>> defined
>> > > > onAnswer for each one, so that when they #answer, it sends  
>> it back to
>> > > > Welcome, which will then #answer the original #call from my  
>> workflow.
>> > > >
>> > > > Both of those subcomponents validate the input, and if all  
>> is well,
>> > > > they #answer with a User object.  If something went wrong,  
>> the stuff
>> > > > the message into an instance variable called 'errors' that  
>> is always
>> > > > checked when the components are rendered.
>> > > >
>> > > > When one of the forms suceeds, and the user object is sent  
>> back with
>> > > > #answer, I then store it in my session (I subclassed  
>> WASession and
>> > > > added an instance variable called 'user').
>> > > >
>> > > > I hope that gives you a rough idea as to how something like  
>> this could work.
>> > > >
>> > > > -
>> > > > Michael Gorsuch
>> > > > Styled Bits 2.0: They're Mostly Broken, But I Try
>> > > > http://www.styledbits.com
>> > > > _______________________________________________
>> > > > Seaside mailing list
>> > > > [hidden email]
>> > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/ 
>> seaside
>> > > >
>> > >
>> > _______________________________________________
>> > Seaside mailing list
>> > [hidden email]
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >
>>
>>
>> --
>> Styled Bits 2.0: The Cult of Tech
>> http://www.styledbits.com
>> _______________________________________________
>> Seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Login process

Monty Williams
In reply to this post by Squeak Smalltalk
RE: [Seaside] Login process

Does anyone have Seaside code to accept OpenID logins? I'm looking for a combo login that accepts either Username/Password or an OpenID URI.

I have an OpenID through my Yahoo account and it's been useful not to have to register separately on number of websites. www.myopenid.com is another identity provider.

See: http://en.wikipedia.org/wiki/OpenID or http://openid.net/ for background.

Thanks,
Monty

-----Original Message-----
From: Todd Blanchard [[hidden email]]
Sent: Monday, June 18, 2007 9:30 AM
To: Seaside - general discussion
Subject: Re: [Seaside] Login process

This is one of  those things that gets done over and over and over 
again.  It is a well known pattern.  It would be really cool if 
someone would do this once and put it on squeaksource.


On Jun 18, 2007, at 8:37 AM, Squeak Smalltalk wrote:


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Login process

Jimmie Houchin-3
In reply to this post by tblanchard
Todd Blanchard wrote:
> This is one of  those things that gets done over and over and over
> again.  It is a well known pattern.  It would be really cool if someone
> would do this once and put it on squeaksource.
[snip discussion about creating a login process]

Agreed.

I think it would be nice if something this basic could simply be a part
of Seaside itself.

Would it be reasonable to refactor Pier Security and Pier Unix Security
move them to Seaside itself and be a part of the base distribution.
Would Avi and Lukas be agreeable to such?

If so, are there other parts of Pier that it would be nice to be
refactored and put into Seaside itself? Parts that are common to web
development in general and not specific to a CMS type system.

I am trying to get up to speed on Seaside/Pier. I hope to be able to
contribute at some point. But have some learning to do first.

Just wanted to toss out a few thoughts.

Jimmie
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Login process

Philippe Marschall
In reply to this post by Monty Williams
I have something very simple at:
http://www.squeaksource.com/openid.html
It requires testing (and more features wouldn't hurt as well).

Cheers
Philippe


2007/6/18, Monty Williams <[hidden email]>:

>
>
>
> Does anyone have Seaside code to accept OpenID logins? I'm looking for a
> combo login that accepts either Username/Password or an OpenID URI.
>
> I have an OpenID through my Yahoo account and it's been useful not to have
> to register separately on number of websites. www.myopenid.com is another
> identity provider.
>
> See: http://en.wikipedia.org/wiki/OpenID or
> http://openid.net/ for background.
>
> Thanks,
> Monty
>
> -----Original Message-----
> From: Todd Blanchard [mailto:[hidden email]]
> Sent: Monday, June 18, 2007 9:30 AM
> To: Seaside - general discussion
> Subject: Re: [Seaside] Login process
>
> This is one of  those things that gets done over and over and over
> again.  It is a well known pattern.  It would be really cool if
> someone would do this once and put it on squeaksource.
>
>
> On Jun 18, 2007, at 8:37 AM, Squeak Smalltalk wrote:
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside