クラス CasAuthenticationProvider

java.lang.ObjectSE
org.springframework.security.cas.authentication.CasAuthenticationProvider
実装されたすべてのインターフェース:
org.springframework.beans.factory.Awareorg.springframework.beans.factory.InitializingBeanorg.springframework.context.MessageSourceAwareAuthenticationProvider

public class CasAuthenticationProvider extends ObjectSE implements AuthenticationProvider, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware
JA-SIG 中央認証サービス(CAS)と統合する AuthenticationProvider 実装。

この AuthenticationProvider は、CasServiceTicketAuthenticationToken.CAS_STATEFUL_IDENTIFIER または CasServiceTicketAuthenticationToken.CAS_STATELESS_IDENTIFIER と等しい principal 名を含む CasServiceTicketAuthenticationToken リクエストを検証できます。以前に作成された CasAuthenticationToken を検証することもできます。

  • フィールドの詳細

    • messages

      protected org.springframework.context.support.MessageSourceAccessor messages
  • コンストラクターの詳細

    • CasAuthenticationProvider

      public CasAuthenticationProvider()
  • メソッドの詳細

    • afterPropertiesSet

      public void afterPropertiesSet()
      次で指定:
      インターフェース org.springframework.beans.factory.InitializingBeanafterPropertiesSet 
    • authenticate

      public Authentication authenticate(Authentication authentication) throws AuthenticationException
      インターフェースからコピーされた説明: AuthenticationProvider
      AuthenticationManager.authenticate(Authentication) と同じ契約で認証を実行します。
      次で指定:
      インターフェース AuthenticationProviderauthenticate 
      パラメーター:
      authentication - 認証リクエストオブジェクト。
      戻り値:
      資格情報を含む完全に認証されたオブジェクト。AuthenticationProvider が、渡された Authentication オブジェクトの認証をサポートできない場合、null を返すことがあります。そのような場合、提示された Authentication クラスをサポートする次の AuthenticationProvider が試行されます。
      例外:
      AuthenticationException - 認証が失敗した場合。
    • loadUserByAssertion

      protected UserDetails loadUserByAssertion(org.apereo.cas.client.validation.Assertion assertion)
      アサーションに基づいて UserDetails を取得するためのテンプレートメソッド。デフォルトでは、構成済みの userDetailsService を呼び出して、ユーザー名を渡します。デプロイヤーは、このメソッドをオーバーライドして、必要な条件に基づいてユーザーを取得できます。
      パラメーター:
      assertion - CAS アサーション。
      戻り値:
      UserDetails。
    • setUserDetailsService

      public void setUserDetailsService(UserDetailsService userDetailsService)
    • setAuthenticationUserDetailsService

      public void setAuthenticationUserDetailsService(AuthenticationUserDetailsService<CasAssertionAuthenticationToken> authenticationUserDetailsService)
    • setServiceProperties

      public void setServiceProperties(ServiceProperties serviceProperties)
    • getKey

      protected StringSE getKey()
    • setKey

      public void setKey(StringSE key)
    • getStatelessTicketCache

      public StatelessTicketCache getStatelessTicketCache()
    • getTicketValidator

      protected org.apereo.cas.client.validation.TicketValidator getTicketValidator()
    • setMessageSource

      public void setMessageSource(org.springframework.context.MessageSource messageSource)
      次で指定:
      インターフェース org.springframework.context.MessageSourceAwaresetMessageSource 
    • setStatelessTicketCache

      public void setStatelessTicketCache(StatelessTicketCache statelessTicketCache)
    • setTicketValidator

      public void setTicketValidator(org.apereo.cas.client.validation.TicketValidator ticketValidator)
    • setAuthoritiesMapper

      public void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper)
    • supports

      public boolean supports(ClassSE<?> authentication)
      インターフェースからコピーされた説明: AuthenticationProvider
      この AuthenticationProvider が指定された Authentication オブジェクトをサポートする場合、true を返します。

      true を返しても、AuthenticationProvider が提示された Authentication オブジェクトを認証できることは保証されません。これは単に、より詳細な評価をサポートできることを示しているだけです。AuthenticationProvider は、AuthenticationProvider.authenticate(Authentication) メソッドから null を返して、別の AuthenticationProvider を試す必要があることを示すことができます。

      認証を実行できる AuthenticationProvider の選択は、実行時に ProviderManager で行われます。

      次で指定:
      インターフェース AuthenticationProvidersupports 
      戻り値:
      実装が提示された Authentication クラスをより厳密に評価できる場合は true