You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
アカウントロック機構は、パスワード認証をともなうWebアプリケーションの開発ではしばしばセキュリティ要件として盛り込まれることがあります。また、Webサービスのユーザーとしても馴染みのある機能のひとつでしょう。今日は、この機能を Spring Security の認証の枠組みの中で実現する方法について紹介します。なお、本記事は Spring Security 3.0.4 をベースに書かれています。 いきなりですが、 Spring Security では、アカウントロック機構は提供されていません。アカウントをロックするのは認証サービスが行うべきことであり、認証サービスとアプリケーションをつなぐためのフレームワークである Spring Security には、そのような義務はありません。また、アカウントロックの実現方式についても、認証サービスに強く依存します。ですので、アプリケーションへの要求
Rails 2.3.8では、ユーザー認証にrestful_authenticationを使っていたのだけど、Rails 3.0ではdeviseが人気のようなので、こちらに移行してみる。 追記 "devise with all the bells and whistles" を作ってみるとして、リベンジ:Rails 2.3RC1で”Restful Authentication with all the bells and whistles”をやってみるで行ったことをdeviseで行ってみた。この二つのエントリーを読み比べてもらえるとわかりやすいと思う。 環境 Debian GNU/Linux squeeze Ruby 1.8.7 Rails 3.0 gem 1.3.7 devise 1.1.2 目標 リベンジ:Rails 2.3RC1で”Restful Authentication with
Devise is a flexible authentication solution for Rails based on Warden. It: Is Rack based; Is a complete MVC solution based on Rails engines; Allows you to have multiple models signed in at the same time; Is based on a modularity concept: use only what you really need. It's composed of 10 modules: Database Authenticatable: hashes and stores a password in the database to validate the authenticity o
例えば、jQueryで $("#div").load("content_fragment.jsp");のようにコンテンツをロードする処理を想定する。 こういったAjaxによる画面更新では、ロード先のコンテンツがログインを必要とするもので、さらに「ログインしていない場合はログインページにリダイレクト」のような作りになっている場合、セッションが無効な状態(親ページを表示した後セッションタイムアウトしたとか)でロードするとログインページが画面に埋め込まれるような間抜けなことになってしまう。 これの対策としては、jQueryであればHTTPステータスコード200番台か304以外はエラーとして扱われ*1要素の更新が行われないので、Webアプリ側で400番台とかのエラーコードを返せば良い。この場合でも load の第3引数のコールバックは呼び出されるので、そこでエラーであれば通知を出すなりログインペー
はじめに 本連載では「軽量フレームワーク(Lightweight Framework)」の中から注目株をピックアップし、その概略を紹介していこうと思います。第3回目となる今回は、前回に引き続きJavaの軽量フレームワーク「Apache Wicket」について説明していきます。 これまでの連載 Javaで軽快に使える「軽量フレームワーク」特集~Apache Wicketで簡単Webアプリ作成(1) Javaで軽快に使える「軽量フレームワーク」特集~Apache Wicketで簡単Webアプリ作成(2) 前回、Wicketのさまざまな機能を利用してみました。Wicketがどんなフレームワークか、大まかなイメージはつかめたのではないかと思います。しかし、Wicketにはその他にもさまざまな機能が「拡張ライブラリ」として用意されています。これらを追加することにより、更に強力なフレームワークへと強化
前回の続き。。。 戻るボタンもそうなんだけど、例えばログインが必要なページにアクセスしたときに、ログインしていなかった場合、ログインページに遷移する。で、ログインした後に、最初にアクセスしようとしたページに遷移する。 ということがしたい。というわけで、以下のようにしてみる。 LoginPage.java public class LoginPage extends WebPage { private Class<? extends Page> clazz; public LoginPage() { this(HomePage.class); } public LoginPage(Class<? extends Page> clazz) { super(); this.clazz = clazz; this.setDefaultModel(new CompoundPropertyModel<
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く