Is GraphQL and SSO compatible? - single-sign-on

My project has plan to use SSO (maybe use Gluu or Auth0,...) and is also considering to apply GraphQL to our API.
On first look, it seem that these two should be easily compatible as they are working on different layers. But I still want to hear from someone experienced with both if there is any problems, considerations or guidelines when apply them to the project?

GraphQL has no opinion in how you Authenticate or Authorize users. So you can use any auth you like.

Related

what is the best solution for restful authentication in laravel?

I am implementing back-end of a mobile app by Laravel.
current requirement is implementing a stateless solution for authenticating users through restful API.
after that I should find a way to allow users to register and login with their Google and Facebook accounts.
I want to find a stable solution that fit with both of these problem if it is possible.
I know these library exists for laravel but I want an experienced advice to choose best of them:
adamwathan/eloquent-oauth (it seems it is the best fit for my requirements but it is not stable yet)
artdarek/oauth-4-laravel
jenssegers/laravel-oauth
kalley/laravel-oauth-client
Lusitanian/PHPoAuthLib
dschniepp/Laravel-OAuth2-Server
Use oAuth2. There's a few decent packages out there. IMO this is your best bet: https://github.com/lucadegasperi/oauth2-server-laravel
This package fits with the requirements:
https://github.com/tappleby/laravel-auth-token

Start with web API/REST API

I am in the process of creating an app (cross-platform with Ionic framework) and during my research about app with this framework I found the one created for HabitRPG and it is using an API to retrieve data, it totally suits my app as well, but I don't know where to start to create an API nor what to use.
I allready did some quick test with Spring, NodeJS and Symfony (with FOS) but I'm looking for something really easy to use and to setup but still to have a lot of flexibility (like manage security, users, and data visibility).
Is there a specific technology easy enough to start with ?
If you want to create a Web API and host it, you can perhaps have the look at APISpark (http://restlet.com/products/apispark/). It's an online plateform that allows to design your APIs following REST principles and then host them. The data are also managed by the platform.
Hope it helps.
Thierry

play framework app authentication, user management

Following the Book App example in play 2 for scala, I now have a basic working app.
What I want now is to add some features like
User registration
User authenetication to access some pages
What is the best way to do it in play for scala? Should I manage it by my own? is there a plugin for that?
Note: I'm the maintainer of Silhouette.
I can suggest you Silhouette which is a core only fork of Secure Social with the intention to built a more customizable, non-blocking and well tested implementation.
For the first stable version there are only two open issues which must be resolved. And these issues are only future requests. There are no API changes planed. The documentation must be improved and a sample application is started. The unit tests are also a good starting point.
If you plan to follow the authentication flow as stated by Secure Social then stick with it. It exists since more than two years and it is well tested by many companies. Otherwise take a look at Silhouette.
You have two options:
Secure Social (http://securesocial.ws/)
But it has unusual registration flow, where the user have to enter your email first, and receive link to registration form.
However, there is a pull request that address this issue (https://github.com/jaliss/securesocial/pull/260)
Play Authenticate
It doesn't support Scala out of the box. But there is a workaround created by me here: https://github.com/joscha/play-authenticate/issues/92
Both of them requires you to write the interface layer to database. An important drawback in both of them, is that you won't be able to make use of reactive database drivers like Reactive Mongo. they assume that you will return the results immediately, not a Future of the result.
There is a securesocial plugin (http://securesocial.ws). Covers most common authentication methods, has registration stuff. I found it very usefull.
The drawback is it's documentation. If you want to do something a bit differ from the simplest scenarios - be prepared to read through the source code.

Is Meteor an option, if i need an additional REST API?

I'm, going to write a web app, which should be CRUD accessible from both, the web and native mobile device apps. For the latter i'm definitely committed to a REST API. Is it possible to realize that with Meteor.com ? Would it be an option to use Meteor for just the web and a second REST interface to directly talk to the mongo? Since the meteor client listens for changes in the mongodb this should not cause conflicts, does it?
As of 2015, look at Gadi's answer for the Meteorpedia entry on REST APIs, and at krose's answer comparing REST API packages. Discussion for folding REST APIs into core is on Hackpad. This question is a duplicate of How to expose a RESTful service with Meteor, which has much better answers. -- Dan Dascalescu
Old answer (2012) below.
For adding RESTful methods on top of your data, look into the Collection API written for Meteor:
https://github.com/crazytoad/meteor-collectionapi
As for authentication for accessing the database, take a look at this project:
https://github.com/meteor/meteor/wiki/Getting-started-with-Auth
Both are definitely infantile in development, but you can create a RESTful API and integrate it with a mobile native client pretty easily.
There are a lot of duplicates of this question. I did a full write-on on this in Meteorpedia which I believe covers all issues:
http://www.meteorpedia.com/read/REST_API
The post reviews all 6 options for creating REST interfaces, from highest level (e.g. smart packages that handle everything for you) to lowest level (e.g. writing your own connectHandler).
Additionally the post covers when using a REST interface is the right or wrong thing to do in Meteor, references Meteor REST testing tools, and explains common pitfalls like CORS security issues.
If you are planning to develop a production application, then Meteor is not an option right now. Its under constant change, and there are still many common features it has to support before its ready to use, which will be quite some time.
For your Question, Somebody has already asked and answered the question about support for file uploading in meteor(also contains HTTP handing related information).
How would one handle a file upload with Meteor?

The best way to implement REST in CakePHP 1.3?

Does anyone know of any tutorials that explain clearly how to implement simple REST functionality with authorization.
I've seen a few plugins and got also got some basic REST functionality working but there seems no clear guidelines about how to build a secure REST service in Cake.
Any help appreciated.
Sounds like you need to look into OAuth which uses REST to connect to Web Sevices without sending usernames and passwords.
Try these tutorials for a start
http://code.42dh.com/oauth/
http://www.neilcrookes.com/2010/04/12/cakephp-oauth-extension-to-httpsocket/