I know that it might be an old question, But I didn't find a solution for it. I need an Oauth2 Provider (not client) to secure my APIs that works on play framework java (not scala). I think this is important, any one reached for a solution for that.
The master branch of securesocial have support for play 2.3. Here is the project website: http://securesocial.ws/ . There isn't a stable version right now.
Related
I'm trying to make a prototype web service. I'm using Play framework 2.3.8, Scala 2.11. I would like to implement user sign-in by using Facebook or any other social media service. I'm trying to find an online tutorial or any blog which explains how to do this. All I find is Play and Java related. Nothing about Scala. Could you please share some link how where to read about about it?
I had written one with Java and Spring, might be it will help you. Here is the link for the same : Facebook Graph API implementation
You could take a look at securesocial or play-silhouette.
Personally I only have experience with securesocial, together with Play 2.2. The master branch (upcoming Securesocial 3.0 release) supports Play 2.3, though you will probably need to browse the Google Group to find the necessary information to set it up.
Hey I love Play Framework Scala and I also am falling in love with Firebase. I was wondering though, I'm planning on building an app using AngularFire and I'm going to need to do some server-side logic/computation and make some server-side queries to Firebase. Is this possible to do with a Play Framework Scala setup? If so what is the recommended approach? If not, is it coming? If so when? I think it's so cool that the Firebase guys used Scala to build Firebase, but I'm bummed there is no Scala API to work with (that I can see). Maybe I could use the Java API somehow, but write still write the app in Scala? Any help would be great. Thanks!
Scala is highly interoperable with Java (compiles to the same bytecode) so you should be able to use the Java API straight-up without any issues.
While some libraries add Scala-specific wrappers to make an API more idiomatic and pleasant for a functional programming style and to smooth some rough edges, it's often not strictly necessary.
If for some reason you didn't want to use the Java client libs, you could also interface with the Firebase REST API via Play 2's very convenience and succinct web services library.
Should be no problem with either their Java SDK (when using Firebase on the backend) or the JavaScript SDK (when using it on the client). But you won't have native support for Scala or Play, especially no support for Iteratee/Enumeratee in Play.
The Java API looks quite good and seems to be event driven. So it should be no problem to integrate it in Play in a scalable way.
So I made this website to use websockets. All was good on my localhost and then I decided to deploy on Heroku. This broke the website because Heroku does not support websockets!
I wonder if anyone has written a simple adapter that allows me to use comet on the front-end and trick my Scala Play 2.1 server into thinking it's using websockets on the back end. Then I could use another adapter on the front-end to trick it into thinking it's using websockets as well and I wouldn't have to change too much code.
I found this using google: http://www.playframework.com/documentation/2.0/ScalaComet
Is that what you need?
We are developing an application that has an iPhone client, and a Rails server. We have released a first version, and are now starting to work on 1.1 version.
We were wondering if there are any tools (external or provided by hostingrails) to address those two basic requirements:
- development / production versions of a Rails application
- simultaneous live versions of the application (versioned APIs) for example to keep supporting older versions of the client application iPhone.
A first approach we are thinking of right now would be to duplicate the application for each version of the API we want to have, each of them being referenced by a specific URL for example: myapp.com/v1 , myapp.com/v2 ...
This entire stack would itself be duplicated in order to have a live/production version, and a development one. Once tested, the development version would be switched with the production version.
What do you think of this approach ? Are there any tools that allow to manage the lifecycle of the application ?
Does Rails has built-in features facilitating this ?
Thanks
The simplest thing would just be to keep your API backward-compatible, thus obviating the need to maintain two versions of the API, and if you must evolve it in a way that breaks backwards compatibility, deprecate the old API and give it a real termination date so that you don't support it ad infinitum.
If you absolutely have to go down this road, read Fowler's blog post on the topic first (http://martinfowler.com/bliki/TolerantReader.html) and then look at namespacing your API routes. In Rails you could accomplish this using namespaced routes and controllers, so you might have your original api at /application/endpoint and your new version at /application/v2/endpoint (I'm assuming that you can't change your endpoints for old clients easily)
I'm not aware of any tools that explicitly claim to solve the problems you're saying you want to solve, but I think that has more to do with developers working hard not to need them than the idea that they're not solvable in Rails.
Did you consider using Subdomains?: http://railscasts.com/episodes/221-subdomains-in-rails-3
Does anyone know of a OAuth 2.0 provider (server side) implementation for Scala/Lift? I see Scala 2.0 client, but no provider.
It doesn't look like there is one readily available. So I think you have two options:
Implement one yourself.
Use a Java library in Scala. However this is probably not the optimal root due to the obvious impedance mismatch. But, I don't see much other choice. The project has both an OAuth client/server library and an example on how to use it.
Check this question:
OAuth2 provider for Scalatra or Play framework in Scala
So far, I have found https://github.com/nulab/scala-oauth2-provider and it works good for me. However, I have used it with Play Framework https://github.com/tuxdna/play-oauth2-server.
this library may help Scala-OAuth