public class BasicAuthenticationActionFilter extends Object implements ActionFilter
修飾子とタイプ | フィールドと説明 |
---|---|
static int |
DEFAULT_RETRY_COUNT
デフォルト再試行回数。
|
コンストラクタと説明 |
---|
BasicAuthenticationActionFilter(String realm)
コンストラクタ
|
BasicAuthenticationActionFilter(String realm,
int retryCount)
コンストラクタ
|
修飾子とタイプ | メソッドと説明 |
---|---|
protected void |
badRequest(javax.servlet.http.HttpServletResponse response)
Bad Requestレスポンスを設定します。
|
boolean |
doFilter(String path,
PathVariables variables,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ActionFilterChain filterChain)
Filter 機能を実行します。
|
protected boolean |
doLogin(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String username,
String password)
ログイン処理を行います。
|
protected void |
unauthorized(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Unauthorizedレスポンスを設定します。
|
public static final int DEFAULT_RETRY_COUNT
public BasicAuthenticationActionFilter(String realm)
realm
- 認証時に表示するrealmを指定して下さい。public BasicAuthenticationActionFilter(String realm, int retryCount)
realm
- 認証時に表示するrealmを指定して下さい。retryCount
- 再試行可能回数public boolean doFilter(String path, PathVariables variables, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ActionFilterChain filterChain) throws IOException, javax.servlet.ServletException
ActionFilter
doFilter
インタフェース内 ActionFilter
path
- パスvariables
- パス変数request
- リクエストresponse
- レスポンスfilterChain
- 次のフィルタIOException
- 入出力処理においてエラーが発生した場合javax.servlet.ServletException
- サーブレット・コンテナでエラーが発生した場合protected void badRequest(javax.servlet.http.HttpServletResponse response) throws IOException
response
- レスポンスIOException
- IO例外protected boolean doLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String username, String password) throws IOException
request
- リクエストresponse
- レスポンスusername
- ユーザ名 (テナントID除去済)password
- パスワードIOException
- IO例外protected void unauthorized(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
request
- リクエストresponse
- レスポンスIOException
- IO例外Copyright © 2012 NTT DATA INTRAMART CORPORATION