クラス CasAuthenticationEntryPoint
- java.lang.Object
-
- org.springframework.security.cas.web.CasAuthenticationEntryPoint
- 実装されているすべてのインターフェース:
org.springframework.beans.factory.InitializingBean,AuthenticationEntryPoint
public class CasAuthenticationEntryPoint extends java.lang.Object implements AuthenticationEntryPoint, org.springframework.beans.factory.InitializingBean
ExceptionTranslationFilterが JA-SIG 中央認証サービス(CAS)を介して認証を開始するために使用します。ユーザーのブラウザーは、JA-SIG CAS エンタープライズ全体のログインページにリダイレクトされます。このページは、
loginUrlプロパティによって指定されます。ログインが完了すると、CAS ログインページはserviceプロパティで指定されたページにリダイレクトされます。serviceは、現在のアプリケーションに属する HTTP URL です。serviceURL はCasAuthenticationFilterによって監視され、CAS ログインが成功したことを検証します。
コンストラクターの概要
コンストラクター コンストラクター 説明 CasAuthenticationEntryPoint()
方法の概要
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 voidafterPropertiesSet()voidcommence(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse response, AuthenticationException authenticationException)認証スキームを開始します。protected java.lang.StringcreateRedirectUrl(java.lang.String serviceUrl)CAS サーバーへのリダイレクト用の URL を作成します。protected java.lang.StringcreateServiceUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)新しいサービス URL を構築します。protected booleangetEncodeServiceUrlWithSessionId()サービス ID をセッション ID でエンコードするかどうかを設定します。java.lang.StringgetLoginUrl()企業全体の CAS ログイン URL。ServicePropertiesgetServiceProperties()protected voidpreCommence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)リダイレクトが発生する前に独自の前処理を行うためのテンプレートメソッド。voidsetEncodeServiceUrlWithSessionId(boolean encodeServiceUrlWithSessionId)サービス ID をセッション ID でエンコードするかどうかを設定します。voidsetLoginUrl(java.lang.String loginUrl)voidsetServiceProperties(ServiceProperties serviceProperties)
メソッドの詳細
afterPropertiesSet
public void afterPropertiesSet()
- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBeanのafterPropertiesSet
commence
public final void commence(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse response, AuthenticationException authenticationException) throws java.io.IOExceptionインターフェースからコピーされた説明:AuthenticationEntryPoint認証スキームを開始します。ExceptionTranslationFilterは、このメソッドを呼び出す前に、AbstractAuthenticationProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEYという名前のHttpSession属性にリクエストされたターゲット URL を入力します。実装では、必要に応じて
ServletResponseのヘッダーを変更して、認証プロセスを開始する必要があります。- 次で指定:
- インターフェース
AuthenticationEntryPointのcommence - パラメーター:
servletRequest-AuthenticationExceptionが発生したリクエストresponse- ユーザーエージェントが認証を開始できるようにするauthenticationException- 呼び出しの原因となった例外- 例外:
java.io.IOException
createServiceUrl
protected java.lang.String createServiceUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)新しいサービス URL を構築します。デフォルトの実装では、大部分の作業を CAS クライアントに依存しています。- パラメーター:
request- HttpServletRequestresponse- HttpServlet レスポンス- 戻り値:
- 構築されたサービス URL。NULL にすることはできません。
createRedirectUrl
protected java.lang.String createRedirectUrl(java.lang.String serviceUrl)
CAS サーバーへのリダイレクト用の URL を作成します。デフォルトの実装では、大部分の作業を CAS クライアントに依存しています。- パラメーター:
serviceUrl- 含める必要があるサービスの URL。- 戻り値:
- リダイレクト URL。NULL にすることはできません。
preCommence
protected void preCommence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)リダイレクトが発生する前に独自の前処理を行うためのテンプレートメソッド。- パラメーター:
request- HttpServletRequestresponse- HttpServletResponse
getLoginUrl
public final java.lang.String getLoginUrl()
企業全体の CAS ログイン URL。通常はhttps://www.mycompany.com/cas/loginのようなものです。- 戻り値:
- 企業全体の CAS ログイン URL
getServiceProperties
public final ServiceProperties getServiceProperties()
setLoginUrl
public final void setLoginUrl(java.lang.String loginUrl)
setServiceProperties
public final void setServiceProperties(ServiceProperties serviceProperties)
setEncodeServiceUrlWithSessionId
public final void setEncodeServiceUrlWithSessionId(boolean encodeServiceUrlWithSessionId)
サービス ID をセッション ID でエンコードするかどうかを設定します。- パラメーター:
encodeServiceUrlWithSessionId- サービス ID をセッション ID でエンコードするかどうか。
getEncodeServiceUrlWithSessionId
protected boolean getEncodeServiceUrlWithSessionId()
サービス ID をセッション ID でエンコードするかどうかを設定します。- 戻り値:
- サービス ID をセッション ID でエンコードするかどうか。