/    Sign up×
Community /Pin to ProfileBookmark

Session Control and Username and Password Authentication

Hello – this is my first post here ?

I have been at this for days now and I’m stumped as to how to build my own webserver with session control and username and password authentication with good security. The user must login to have access to the website app I’m trying to build. I have source to the web server as well which is not your normal Apache or other server but there are various reasons I need to use that one instead and I have the source to the server and I’m very proficient in the language.

First, I’m thinking that once the user successfully signs on the server would send a random and unique session ID. Now, I need a way for every to validate that they have a session unique ID and the server sees that it is a valid one.

I’m wondering what is the best way to set up decent security (I’m not bank or anything but good security is always nice). So here are my questions:

  • 1.

    Am I better off with hidden fields or java script cookies? Advantages of each?

  • 2.

    Do most computers at internet cafe’s etc, have javascript cookies enabled?

  • 3.

    If I use hidden fields, I’m stumped if there are only labels with href on the HTML page and no submit button, how do those pages get the values from the hidden fields?

  • 4.

    If I use JavaScript cookies then I can easily assign a random session ID from my webserver to a JavaScript cookie, and again if a user clicks on a label to go from say the homepage.htm to details.htm then how does details.htm send the cookie to the server for verification?

  • I’m just having a lot of trouble figuring out a way for the server to check verification on each web page that they have signed on.

    Thanks,
    Mike

    to post a comment
    JavaScript

    2 Comments(s)

    Copy linkTweet thisAlerts:
    @bathurst_guyApr 13.2008 — Just use a [url=http://au.php.net/manual/en/ref.session.php]PHP session[/url]... and check for it's existence on each page.
    Copy linkTweet thisAlerts:
    @mike2008authorApr 13.2008 — The web server I am using does not support php. But, I figured out how to reprogram the server so that it will support its own sessions. I have the source code so I'm able to change it and recompile it.

    Thanks,

    Mike
    ×

    Success!

    Help @mike2008 spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...