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 8030749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:52:13+00:00 2026-06-05T00:52:13+00:00

I am currently writing a rest API in python with the microframework Flask. It’s

  • 0

I am currently writing a rest API in python with the microframework Flask. It’s a private API and it deals with user data. I plan to use this API to build a web and an Android app.

For now I use digest auth to secure private user data. For example if you want to post data on my service with the user bob you make a post request at myapi/story/create and provide bob’s credentials with the digest pattern.

I am aware this is not a good solution because :
-Digest auth is not secure
-The client is not authenticated (How to secure requests not related with current user, for example create a new user ?)

I read a lot of stuff about oAuth but the 3-legged authentication seems overkill because I don’t plan to open my API to third party.
The 2-legged oAuth won’t fit because it only provides authentification for clients and not for users.
Another problem with oAuth is that I haven’t found a comprehensive guide for implementing it in Python. I found the python-oauth2 library, but I don’t understand the server example and I can’t find additional documentation. Plus it seems that many aspects of oAuth are not covered in this example.

So my questions are :

  1. Is there alternative scheme (not oAuth) for authenticate both client and user with a reasonable level of security ?
  2. If oAuth is the best solution :
    • How to skip the authorization process (because users won’t have to authorize third party clients)?
    • Is there detailled documentation for python-oauth2 or for any other Python library?

Any help or advice will be appreciated.

  • 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-06-05T00:52:17+00:00Added an answer on June 5, 2026 at 12:52 am

    The simple answer is to expose your API via HTTPS only, and then use HTTP Basic authentication. I don’t think there’s really any reason to bother with Digest. Basic authentication is insecure, but is submitted with every request so you never need to worry about your authentication going stale or whatever. By tunneling it over HTTPS, you have a secure connection.

    If you want to authenticate the client, you could use SSL client certificates. That said, in general it’s pretty tough to really lock down the client against malicious users, so I would consider making the sign-up functions openly accessible and protect yourself from DOS etc via out-of-band account verification.

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

Sidebar

Related Questions

Writing an iPhone app, and I'm getting my data from a REST API that
I am currently writing a REST API using Symfony2. I started using Symfony2 one
I'm currently writing an app in Python and need to provide localization for it.
I am currently writing an application where the user has, at some point, to
I'm writing a library that wraps around a REST API. The wrapper I'm creating
I am currently writing a java REST Web Service using Netbeans and Glassfish. The
I'm writing a REST service in Erlang and need to verify the received data
I am currently adding a REST API over http to an online service and
I am in the process of writing a Java REST API for a reservation
I'm currently developing a C# MVC REST web api, and am trying to choose

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.