Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4347364
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:17:47+00:00 2026-05-21T12:17:47+00:00

I have just implemented my first Restlet application (finally :]) and now I’m onto

  • 0

I have just implemented my first Restlet application (finally :]) and now I’m onto a bigger question. I built a really simple resource called LoginResource, which allows a POST and a GET operation to allow users to login and to check if they’re logged in, respectively. Now that I’ve implemented this and I can actually have a client call the server, “log in,” and see a result, how can I actually keep track of whether someone is logged in or not?

My application needs the following:

  1. I need a way to have a client initially log in and be able to see if they’re logged in via a resource.
  2. I need to provide “secured” access to a list of objects via another resource. It’s pretty simple, but it depends on me being able to control access, which as of right now I’m unable to do as I don’t have any sense of sessions activated.

Is there an easy way to allow for me to enable sessions and keep users logged in for a time? If this were PHP, this would be my code:

// login.php: login code
$username = $_POST['username'];
$password = $_POST['password'];

if (validate($username, $password)) {
    session_start();
    $_SESSION['is_logged_in'] = "yarp";
    echo get_login_success();
} else {
    echo get_login_failure();
}

// list.php: display list of objects
if (isset($_SESSION['is_logged_in']))
    echo get_object_list();
else
    echo get_security_error();

I hate to bring it all back to PHP, but hey, it makes for quick pseudo-code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T12:17:47+00:00Added an answer on May 21, 2026 at 12:17 pm

    Have a look at HTTP Basic, HTTP Digest and HTTP OAuth authentications (all supported by Restlet).

    For some clients such as browsers, cookie based authentication is still used in REST but without a server-side sesssion.

    Check this link:
    http://restlet.tigris.org/issues/show_bug.cgi?id=605

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple accordion setup, with just two sections. The top, first section
I just started to develop with Google AppEngine and now I have my first
Having just implemented this, I have a pretty basic question about how authentication and
Well, first of all , I have to confess, I've really didn't implemented linked-list,
I have just implemented WMD for my editor in an ASP.NET app. The problem
I am developing a Silverlight app using VS2008 Express. I have just implemented a
I have just put implemented Facebook connect on my web-site using the JavaScript SDK.
We're just getting into MVVM in WPF. We have implemented our ViewModels with 'strongly
I have just started using RSpec and I copied the very simple test on
I have a 2 tabs application. In the first one, I'm creating objects of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.