Authentication using Google Apps Domain

7 views
Skip to first unread message

hiko

unread,
Feb 10, 2010, 10:54:37 AM2/10/10
to GoogleFileService
Hi.

I downloaded "GoogleFileService-v0.3.zip" and deployed it as my
application.
It did not operate at the setting of the Google-Apps-Domain-
Authentication, though it operated at the setting of the Google-
Account-Authentication.

Please give the hint to me.

hiko

tytung

unread,
Feb 10, 2010, 12:20:58 PM2/10/10
to GoogleFileService
Hi hiko,

I am not sure if GAE supports Google-Apps-Domain Authentication or
not.
If not, you may implement your own logging-in process by using AuthSub
(http://code.google.com/intl/en/apis/accounts/docs/AuthSub.html)

The below url give the main idea. When logging-in from the web
application, you should use AuthSub instead of ClientLogin.
http://groups.google.com/group/google-appengine-java/browse_thread/thread/5c47fd656c7e84e8/5263f74c0754968a?hl=zh-TW&lnk=gst&q=httpclient&pli=1

tytung

hiko

unread,
Feb 11, 2010, 11:39:44 AM2/11/10
to GoogleFileService
Thanks TyTung.

It came to operate by adding the account of Google-Apps-Domain to the
developer.
However, it doesn't operate by non-developer account.

> Error: Server Error
>
> The server encountered an error and could not complete your
request.
> If the problem persists, please report your problem and mention
this error message and the query that caused it.

And, it operated by deleting the following sentences.

-- file_list.jsp --
if (!userService.isUserAdmin()) {
// [delete] query.setFilter("fileOwner == '"+userName+"'");
}

I challenge a little more.

hiko


On 2月11日, 午前2:20, tytung <tyt...@gmail.com> wrote:
> Hi hiko,
>
> I am not sure if GAE supports Google-Apps-Domain Authentication or
> not.
> If not, you may implement your own logging-in process by using AuthSub
> (http://code.google.com/intl/en/apis/accounts/docs/AuthSub.html)
>
> The below url give the main idea. When logging-in from the web

> application, you should use AuthSub instead of ClientLogin.http://groups.google.com/group/google-appengine-java/browse_thread/th...

tytung

unread,
Feb 11, 2010, 12:22:42 PM2/11/10
to GoogleFileService
Hi hiko,

Comment or delete query.setFilter("fileOwner == '"+userName+"'"); will
cause all uploaded files can be seen by every logged-in users, i.e.,
user A can see the files uploaded by user B.

Maybe you should use another method to set the name of logged-in user
to the variable userName instead of deleting it.

P.S.: The variable userName is set from 'config.jsp' ( userName =
userService.getCurrentUser().getNickname(); ).

tytung

> > > hiko- Hide quoted text -
>
> - Show quoted text -

hiko

unread,
Feb 12, 2010, 12:30:20 PM2/12/10
to GoogleFileService
Hi TyTung.

As for the file, it did not change, and userName was also normal.

It operated though query.setOrdering("data desc") was deleted instead
of query.setFilter("fileOwner == '"+userName+"'")

> if (!userService.isUserAdmin()) {


> query.setFilter("fileOwner == '"+userName+"'");
> }

> // [Comment] query.setOrdering("data desc");

It seems to fail if setFilter and setOrdering are used at the same
time.

hiko

Message has been deleted
Message has been deleted

tytung

unread,
Feb 13, 2010, 12:55:10 PM2/13/10
to GoogleFileService
Hi, hiko

The methods setFilter and setOrdering can be used at the same time.
The official documentation is as follows:
http://code.google.com/intl/en/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Queries
FYI

tytung

> > > - Show quoted text -- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

Reply all
Reply to author
Forward
0 new messages