public class CasAuthenticationProvider extends java.lang.Object implements AuthenticationProvider, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware
AuthenticationProvider 実装。 この AuthenticationProvider は、CasAuthenticationFilter.CAS_STATEFUL_IDENTIFIER または CasAuthenticationFilter.CAS_STATELESS_IDENTIFIER のいずれかに等しい principal 名を含む UsernamePasswordAuthenticationToken リクエストを検証することができます。以前に作成した CasAuthenticationToken を検証することもできます。
| 修飾子と型 | フィールドと説明 |
|---|---|
protected org.springframework.context.support.MessageSourceAccessor | messages |
| コンストラクターと説明 |
|---|
CasAuthenticationProvider() |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | afterPropertiesSet() |
Authentication | authenticate(Authentication authentication)AuthenticationManager.authenticate(Authentication) と同じ契約で認証を実行します。 |
protected java.lang.String | getKey() |
StatelessTicketCache | getStatelessTicketCache() |
protected org.jasig.cas.client.validation.TicketValidator | getTicketValidator() |
protected UserDetails | loadUserByAssertion(org.jasig.cas.client.validation.Assertion assertion) アサーションに基づいて UserDetails を取得するためのテンプレートメソッド。 |
void | setAuthenticationUserDetailsService(AuthenticationUserDetailsService<CasAssertionAuthenticationToken> authenticationUserDetailsService) |
void | setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper) |
void | setKey(java.lang.String key) |
void | setMessageSource(org.springframework.context.MessageSource messageSource) |
void | setServiceProperties(ServiceProperties serviceProperties) |
void | setStatelessTicketCache(StatelessTicketCache statelessTicketCache) |
void | setTicketValidator(org.jasig.cas.client.validation.TicketValidator ticketValidator) |
void | setUserDetailsService(UserDetailsService userDetailsService) |
boolean | supports(java.lang.Class<?> authentication) この AuthenticationProvider が指定された Authentication オブジェクトをサポートする場合、true を返します。 |
public void afterPropertiesSet()
org.springframework.beans.factory.InitializingBean 内の afterPropertiesSet public Authentication authenticate(Authentication authentication) throws AuthenticationException
AuthenticationProviderAuthenticationManager.authenticate(Authentication) と同じ契約で認証を実行します。AuthenticationProvider 内の authenticate authentication - 認証リクエストオブジェクト。AuthenticationProvider が、渡された Authentication オブジェクトの認証をサポートできない場合、null を返すことがあります。そのような場合、提示された Authentication クラスをサポートする次の AuthenticationProvider が試行されます。AuthenticationException - 認証が失敗した場合。protected UserDetails loadUserByAssertion(org.jasig.cas.client.validation.Assertion assertion)
assertion - CAS アサーション。public void setUserDetailsService(UserDetailsService userDetailsService)
public void setAuthenticationUserDetailsService(AuthenticationUserDetailsService<CasAssertionAuthenticationToken> authenticationUserDetailsService)
public void setServiceProperties(ServiceProperties serviceProperties)
protected java.lang.String getKey()
public void setKey(java.lang.String key)
public StatelessTicketCache getStatelessTicketCache()
protected org.jasig.cas.client.validation.TicketValidator getTicketValidator()
public void setMessageSource(org.springframework.context.MessageSource messageSource)
org.springframework.context.MessageSourceAware 内の setMessageSource public void setStatelessTicketCache(StatelessTicketCache statelessTicketCache)
public void setTicketValidator(org.jasig.cas.client.validation.TicketValidator ticketValidator)
public void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper)
public boolean supports(java.lang.Class<?> authentication)
AuthenticationProviderAuthenticationProvider が指定された Authentication オブジェクトをサポートする場合、true を返します。true を返すことは、AuthenticationProvider が Authentication クラスの提示されたインスタンスを認証できることを保証しません。それは、それがより詳細な評価をサポートできることを示しています。AuthenticationProvider は、AuthenticationProvider.authenticate(Authentication) メソッドから null を返して、別の AuthenticationProvider を試す必要があることを示すことができます。
認証を実行できる AuthenticationProvider の選択は、実行時に ProviderManager で行われます。
AuthenticationProvider 内の supports Authentication クラスをより厳密に評価できる場合は true