GData supports this feature.

I am not sure whether GData supports Python.

For Java:

1. Authorize
GoogleAuthTokenFactory factory = new GoogleAuthTokenFactory("ah, 
"MyCompany-MyApp-Version", null);
// Obtain authentication token from Google Account
String token = factory.getAuthToken(email, password, null, null, "ah", 
"MyCompany-MyApp-Version");
String loginUrl = "https://app-id.appspot.com/_ah/login?continue=/"; + 
"&auth=" + token

URL url = new URL(loginUrl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.connect();

int statusCode = connection.getResponseCode();
if ((statusCode != HttpURLConnection.HTTP_OK)
      && (statusCode != HttpURLConnection.HTTP_MOVED_TEMP)) {
   String responseText = Utils.getResposeText(connection);
   throw new StatusCodeException(statusCode, responseText);
}

// Retrieve the cookies
....


2. Access to http://app-id.appspot.com with cookies from step #1

Hope this help



On Wednesday, October 10, 2012 3:36:45 PM UTC+7, Ludd wrote:
>
> Is there any simple user authorization mechanism for installed app in 
> google app engine?
>
> Background:
> There is some functionality in my GAE app that only some group of user 
> should have access to (for example, app admins). 
> Utility to work with functionality implemented as python client 
> application (runned on local pc, not in browser).
>
> I've tried to use Users service, but users.get_current_user() returns 
> None. AFAICS, it happens cause user login information stored as cookie in 
> browser and admin utility communicates with GAE app using it's own httplib2 
> http object. And there is no information about user login in it.
>
> Also I've tried to use oauth2, but Decorator implementation depends on 
> users.get_current_user() 
> and result is the same.
>
> Seems that, "login: admin" field in app.yaml depends on Users service too.
>
> Maybe there is some simple way to login user from client app without 
> browser?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/zDVFuqNNNUoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to