restful-authentication

RESTful authentication for web applications [closed]

六眼飞鱼酱① 提交于 2019-12-03 00:49:42
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . Hi already wrote this observation and question on this question earlier, but only later noticed that it was an old and "dead" question. As I'd really like some insights from others, I'm reposting it as a new question. To the question of how to do authentication RESTfully,

JAX-RS and custom authorization

一个人想着一个人 提交于 2019-12-03 00:35:41
I'm trying to secure the JAX-RS endpoint and am currently trying to figure out how the authentication and authorization work. Most examples are quite simple as they only piggyback from Java EE App-Server role via web.xml. I'm wondering how to use something else than the Java EE AS roles. For example: I'd like to use session or some sort of token (or some sort of identifier). It all depends upon the JAX-RS implementation you're using. I'm using Jersey on embedded Jetty . SecurityHandler sh = new SecurityHandler(); // the UserRealm is the collection of users, and a mechanism to determine if //

Implementing an RESTful API Authentication using tokens (Yii/Yii2)

人盡茶涼 提交于 2019-12-03 00:30:03
问题 I am building an API in Yii 1.x which will be used with a mobile application. Part of the process involves a login (with a username and password) using the following JSON request below:- // Request sent with username & password { "request" : { "model" : { "username" : "bobbysmith", "password" : "mystrongpassword" } } } // If successfully logged in return the following response { "response": { "code": 200, "message": "OK", "model": { "timestamp": 1408109484, "token":

Best way to secure Private REST API without user authentication for mobile app

 ̄綄美尐妖づ 提交于 2019-12-03 00:16:53
I am making some Restful APIs for my mobile application. The communication between APP and webserver has to be made in REST. These apis should be private , and only my app should able to call them for successful results. The tough part is, there is no user id and password required in my app so i do not know how could i restrict rest API with the mobile app without basic user authentication. One solution i thought was to embed some kind of hardcode string so when mobile app will use the restful url they will pass that in encryption format over ssl. But i know this seems like very bad solution..

Are there any disadvantages to GraphQL? [closed]

你说的曾经没有我的故事 提交于 2019-12-03 00:16:37
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 months ago . All the articles about GraphQL will tell you how wonderful it is, but are there any disadvantages or shortcomings to it? Thank you. 回答1: Disadvantages: You need to learn how to set up GraphQL. The ecosystem is still rapidly evolving so you have to keep up. You need to send

Resource level authorization in RESTful service

让人想犯罪 __ 提交于 2019-12-02 23:34:27
Let /users/{id} be a resource url in RESTful service. Basic authentication is enabled and only authenticated users are allowed to access the url. Example Scenario: User_1 & User_2 are authenticated users with userId 1 & 2. Since both are authenticated, both of them are having access to, /users/1 /users/2 But the expectation is User_1 should have access to /users/1 and not to /users/2 or other userId. Question: How to do resource level authorization in RESTful services? Note: I am implementing RESTful using Jax-RS (with Apache CXF implementation), helpful if you could explain with Jax-RS.

How do I authenticate user in REST web service?

这一生的挚爱 提交于 2019-12-02 22:05:42
How do I write the method for user authentication in REST web service? I am beginner with web services. fasseg Authentication itself should be done in a stateless way, so that the REST paradigm is not broken. This means authentication has to occur on every request. this SO question might provide some further details the esiest method is using HTTP-Basic AUTH ( rfc2617 ) over SSL encrypted connections (https). here are some java examples: ericonjava my blog entry another method is using nonces so that you dont have to resend the user/pass combo everytime, but they are a bit more challenging:

Ruby on rails User registration using rest API call and Devise

谁说胖子不能爱 提交于 2019-12-02 21:24:54
Can anyone guide me how to register a user from mobile device (rest API) in ruby on rails. I'm using Devise with Rails 3.0. it is giving me this following error NameError in Devise::CustomRegistrationsController#create I've override the functionality of devise registration controller with the following. def create respond_to do |format| format.html { super } format.json { build_resource if resource.save render :status => 200, :json => resource else render :json => resource.errors, :status => :unprocessable_entity end } end end this solved the problem and I've added skip_before_filter :verify

Securing RESTapi in flask

荒凉一梦 提交于 2019-12-02 21:12:15
The app I'm deving uses a lot of ajax calls. Unfortunately I hit a snag when researching on how to restrict access to the api. For example: i have table that does an ajax call to http://site/api/tasks/bob i need to make sure that only bob, logged in, can read that table (otherwise somebody who knows the pattern might request to see bob's tasks by simply entering the url in the browser). on a different page,the same table needs to be able to call http://site/api/tasks/all and show the tasks of all users (only an admin should be able to do that) Thank you for your time reading this and maybe

Combining Flask-restless, Flask-security and regular Python requests

拜拜、爱过 提交于 2019-12-02 20:50:38
My goal is to provide a REST API to my web application. Using: Python 2.7.5 Flask==0.10.1 Flask-Restless==0.13.1 Flask-Security==1.7.3 I need to secure access to my data for both web and REST access. However, I am unable to get any regular python request succeeding when trying to connect to secured API. The following outputs are obtained using the fully-functional module provided at the end of this question. I manage to get a correct answer when using http://127.0.0.1:5000/api/v1/free_stuff : >>> import requests >>> r=requests.get('http://127.0.0.1:5000/api/v1/free_stuff') >>> print 'status:',