Re: Sinatra Authentication
Dmitriy Non <[email protected]>
| Newsgroups | gmane.comp.lang.ruby.general |
|---|---|
| Message-ID | <[email protected]> |
As Raj suggested, you should've just googled it:) Though I would recommend to decompose your problem. Obviously, you need to learn how to recieve parameters in your sinatra app. Then you need to learn how to keep user data. Session will do, right? And last, you need to learn how to redirect user. So, google this topics: 1. sinatra parameters 2. sinatra session 3. sinatra redirect and go from there > On 20 Oct 2018, at 12:13, Surya Poojary <[email protected]> wrote: > > Hello rubyists! > > I'm trying to learn Sinatra and want to implement an authentication system like > > If username == "me" and password == "she" // go to the next page > > Else > > // Take to some page that says "you are not authorised" > > How do I do this ? > > Gracias, > > Rubyists. > > Unsubscribe: <mailto:[email protected]?subject=unsubscribe> > <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk> Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>