Does AppEngine support OAuth 2.0? - google-app-engine

Does Google AppEngine support OAuth 2.0? And, if so, can you suggest a good tutorial?

The short answer is yes, and they are moving access to their APIs to use 2.0. I have not come across any great tutorials out there but Google is building on their documentation for this. They do have code samples for non App Engine stuff out there.
https://developers.google.com/accounts/docs/OAuth2

For Google APIs there are libraries in:
Python
Java
Go
that you can use on App Engine to access Google APIs using OAuth 2.0. The Python and Java libraries are built on top of a generic library that enables OAuth 2.0 functionality, so if you're accessing non-Google APIs that may be helpful. There may be libraries for other API platforms as well, but your mileage may vary.

Related

Google Cloud SDK vs Google Cloud Client Libraries

How do they differ? and what is the use case for each?
Is it possible for me to use one exclusively, such as if I'm more familiar with .NET I could do everything using the Client Library (for .NET) that I could with python and the SDK?
Google Cloud SDK https://cloud.google.com/sdk/docs/
Google Cloud Client Libraries https://cloud.google.com/apis/docs/cloud-client-libraries
The Cloud SDK is a set of command line tools (gcloud, gsutil, and bq). The use of the term 'SDK' here seems to be misleading and they should probably be called Google Cloud Tools or Google Cloud CLI.
The Cloud Client Libraries are the latest set of libraries available in various languages that you can program against.
There's also an older set of client libraries called the Google API Client Libraries. They're autogenerated from Google service interfaces and are simple wrappers to REST calls. You should probably use the newer Cloud Client Libraries if you can as they are more idiomatic and provide better abstraction.
Jarmod's answer is excellent.
Could I do everything using the Client Library (for .NET) that I could
with python and the SDK?
Almost everything. Exceptions I know:
.NET code can't run on good ole Google App Engine Standard. You can still run your .NET code in Google Compute Engine (on Windows) or Google App Engine Flexible Environment (.NET core code on Linux.)
Tensorflow only has a Python API.
Bigtable doesn't have a .NET API.
https://github.com/GoogleCloudPlatform/dotnet-docs-samples shows how to call many, but not all of the Google Cloud APIs.

Best JavaScript Client Libraries to do OAuth2.0(Google) and access Google CloudEndPoints in phonegap?

I have been developing an online accounting software which is a web application. We use Secured Google Cloud Endpoints in our project. Now I would like to securely access those endpoints in phonegap. So, for that I would like to do OAuth2.0(google) and access my API securely. I have been struggling for a while to find good JavaScript Client Libraries to access my Secured API in phoneGap.
Please help me...
Any replies would be appreciated.
Finally After some struggle I have figured out the solution. If we are trying to do Google OAuth in phone gap its better to use normal JQuery and for calling the Secured Google Cloud Endpoints we can go with Google JavaScript Client Libraries. I have found a sample project oauth-google-api-gapi-phonegap-childbrowser-jquery which is a very good start for the beginners.

JAX-RS services in Google App Engine

I'm developing a Google App Enigne application that uses some REST services and offers in turn web services. I'm using the GAE Eclipse plugin. I have 2 questions:
What is the best JAX-RS library to use with GAE nowadays? I'd like to use Jersey because I understand is the most "standard" library (isn't it?), but I could use any in principle... I've been looking for documentation, but I've only found some samples in blogs that only work with old versions of Jersey, etc...
For the web services I have to offer, I thought of using JAX-RS as well, but now I'm not sure if it's the best option...
You can use Jersey 1.5. You can see all frameworks that will play on GAE at http://code.google.com/p/googleappengine/wiki/WillItPlayInJava
But GAE has realized on version 1.7.5 as experimental service Endpoints which in term are rest service. Check https://developers.google.com/appengine/docs/java/endpoints/
For web service I don't know if you mean soap service..JAX-RS is the specification for rest service, instead you should use JAX-WS I don't try the compatibility with this specification.
After a little research on this subject, I've found out that the best way to offer web services from Google App Engine is using Google Cloud Endpoints, which is still an experimental technology but as far as I've tried, it works well. Furthermore it is very well integrated with GAE and the Google Plugin for Eclipse.
To cosume REST services from Google App Engine, I've opted for using just Java build-in HTTP client library as explained here. I don't know if it's the best way, but it is very simple and you avoid compatibility problems that could arise between GAE and JAX-RS APIs such as Jersey.
In order to work with JSON in GAE (very useful for RESTful services), I'm using Google's gson, which is a Java library that can be used to convert Java Objects into their JSON representation and vice-versa.

App Engine Endpoints

Im starting a new application with AppEngine and I need a REST Service.
I was looking at Endpoints and I think they are exactly what I need.
I also read Google don't recommend to use Endpoints in production but my app first version is not going out until April approximately.
How mature do you think App engine Endpoints are?
Do you recommend to use them or should I find another REST framework.
If so, Are there any other REST framework similar to App Engine Endpoints?
or
Which one do you recommend, Restlet? or use it with Spring MVC?
Thanks
I'm a bit biased (being a Googler and member of the App Engine team), but I think Endpoints is worth a try. With regards to the general disclaimer on using Endpoints in production, we have allowed some developers to launch in production as long as they have spoken to us first.
I provided another answer to a related question on RESTful development here. The developer tried Endpoints and decided to use it over other options.

OAuth in google app engine

I am trying to implement Oauth in google app engine on python. For my application i am using gae sessions and my model to authenticate users. It will be more helpful for me. .If you could provide some examples..
You might want to check out the following resources:
The App Engine OAuth Library, which has support for Dropbox, Twitter, MySpace, and LinkedIn.
The Tipfy Framework (EDIT: links removed to the now defunct tipfy.org).
Using those as a basis, even if you can't use the libraries themselves, you'll have some solid, working examples of how to use OAuth on App Engine.
here's an alternative that supports oauth 1.0, 2.0 and openid:
https://github.com/crhym3/simpleauth

Resources