GAE/javaでのユーザ認証について

100 views
Skip to first unread message

Yutaka Kato

unread,
Jun 11, 2011, 1:03:46 AM6/11/11
to Google-App-Engine-Japan
加藤と言います。

Google App Engine for Javaを勉強して約1ヶ月になります。
すごく基本的なことなのですが、うまくいなく、Googleのドキュメントを見ても
解決できなかったので、質問させてください。

web.xmlファイルによるログインの制御がうまくいきません。
web.xmlに

<security-constraint>
<web-resource-collection>
<web-resource-name>Authentication required url</web-resource-name>
<url-pattern>/location/*</url-pattern>
<url-pattern>/user/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>

と書いています。web-resource-nameタグは、url-patternのところで赤線の警告が
出た(Eclipseで)ので書き足しました。このとき、
http://xxxx.appsopt.com/location/index.jsp
にアクセスすると、googleアカウント、パスワードの問い合わせ画面は出ず、

Error: NOT_FOUND

と表示され、ウェブブラウザのurl入力欄には

http://xxxx.appspot.com/_ah/login_required?continue=http://xxxx.appspot.com/location/index.jsp

と表示されます。locationの下にindex.jspは確かに置いています。
どこが悪いのでしょうか。
よろしくお願いします。

Takashi Matsuo ♟

unread,
Jun 21, 2011, 3:43:18 AM6/21/11
to google-app-...@googlegroups.com

Google 松尾です。

/_ah/login_required にリダイレクトされるということは、Federated Login を使用しているのだと思います。
この場合、/_ah/login_required をユーザーが用意しておく必要がありますね。

下記の記事などが参考になると思いますので、ご覧になってみてください。

-- matsuo
 

--
このメールは Google グループのグループ「Google-App-Engine-Japan」の登録者に送られています。
このグループに投稿するには、google-app-...@googlegroups.com にメールを送信してください。
このグループから退会するには、google-app-engine...@googlegroups.com にメールを送信してください。
詳細については、http://groups.google.com/group/google-app-engine-japan?hl=ja からこのグループにアクセスしてください。




--
Takashi Matsuo
Developer Relations
Developer Advocate for Google App Engine/iGoogle
Google Japan, Inc.

Reply all
Reply to author
Forward
0 new messages