Questions tagged [restful-authentication]

Questions about authentication for RESTful services.

Services designed using REpresentational State Transfer architecture must often authenticate clients. How best to do this can be a complex topic, as in true REST each client request to the server will contain all the information necessary to complete it (including authentication).

Resources

1447 questions
0
votes
2 answers

How to Access REST Web service using file_get_contents with Digest Authentication in php

How can I use Restful API using file_get_contents and Digest Authentication in php. I know I can access it using curl $ch = curl_init('http://webservicesurlhere.com'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); //curl_setopt($ch,…
Developer
  • 25,073
  • 20
  • 81
  • 128
0
votes
2 answers

How to create a secure API for mobile apps

We are building an iPhone app and need to create our own REST API to handle logins etc. The backend is in Java and we need a way to login users to the iPhone application and allow them to make requests to the API as that user. Because there are no…
adamtrousdale
  • 415
  • 6
  • 18
0
votes
0 answers

Calling a Restful API with POST data

I am trying to call my own Restful API with POST data; but it does not work ! Could you please let me know if I am missing something here? My code in login.php: $ch = curl_init(); $UN = htmlspecialchars(strip_tags($_POST['user'])); $PWD =…
user385729
  • 1,924
  • 9
  • 29
  • 42
0
votes
2 answers

How can I protect my API and know what is calling it?

I am building a Web application, and Web API. The Web application will do ajax call to the server and receive JSON results. The same will happen to the Web API. I am planing to ask developers to use keys to access the Web API so that I can charge…
jnbdz
  • 4,863
  • 9
  • 51
  • 93
0
votes
2 answers

Scope of a restful webservice(request,session,application)

What is the scope of a rest-full application . Actually I want to create a Login module , so that only after succeeding the authentication can access next web-service .
Irshad kk
  • 11
  • 2
  • 7
0
votes
0 answers

Custom Form for HTTP Digest Authentication JQuery Mobile

I am trying to replace the default "Authentication Required" box that comes up with authentication with a custom form for a username and password in JQuery Mobile.I am currently using HTTP Digest that I found from a tutorial…
bob565
  • 77
  • 1
  • 6
0
votes
0 answers

Server-side Single sign-on with Live Connect API

Assuming I get user's email and password in a variable, how do I authenticate on Live Connect on behalf of this user who consent to grant me with permissions to access his information ? Is it possible to perform this by only using REST…
0
votes
1 answer

Restful Service and User role authorization

We are creating a Restful Web API for our client which would be consumed by their Native Mobile apps and Web apps only no third party access. Each user has his own credentials and Role in Application, and role based access aka Authorization. What is…
0
votes
0 answers

reauthenticate on RESTful web service in Spring Security Grails plugin

I read a piece code from my friend but I don't understand why it can run. Here is filter of Grails. def filters = { protectResource(uri: "/api/**", uriExclude: "/api/user/*") { before = { .... …
0
votes
1 answer

Two simultaneous HTTP requests; Login and some other data

I am making REST request to login, but i cannot do some other requests as the server returns error 15 which means that i am not logged in. I have to Log in every time i make any request. I tried like this: public class UserLoginTask extends…
Filip Luchianenco
  • 6,912
  • 9
  • 41
  • 63
0
votes
0 answers

Make HTTP request of the Logged in user

In my application I have successfully logged in to my REST server, but i need to get some more data from another activity having the user logged in. I get the following response from the server: Error 15: User not Logged in How do I make server…
Filip Luchianenco
  • 6,912
  • 9
  • 41
  • 63
0
votes
1 answer

Does self as identifier can represent the resource on restful api?

I'm working on REST API, and I trying to understand whether this looks legit in terms of REST. I've players which using some mobile app with a login mechanism, So the question is, if the player needs to update some attribute on his resource, How…
Yarin Gold
  • 489
  • 1
  • 4
  • 17
0
votes
2 answers

ASP.NET Web API how to authenticate user

I'm trying to create a simple user authentication function but I just can't get it to work. Here is the code I'm working on: public class LoginController : ApiController { private void SetPrincipal(IPrincipal principal) { …
0
votes
1 answer

Restful authentication for non browser consumers

I have a web service written as an ASP MVC application which basically uses rolling cookies as its authentication mechanism. So someone sends their username and password over https to the service, it then verifies them and issues them a cookie…
Grofit
  • 17,693
  • 24
  • 96
  • 176
0
votes
1 answer

Cakephp - Custom authentification (basicauth) in a plugin

I am currently developing an Restfull API for my website. I decided to develop it as a plugin. I am using a custom class that extends BasicAuthentification. It allows me to check the client-app credential, in order to limit the API use to only…