私たちには、AuthenticationProvider経由でカスタム認証を実装するwebappがあります。 これで問題はありません。しかし、私たちは、顧客がAuthenticationProviderを実装する独自の認証クラスを実装するオプションを提供したいと考えています。彼らはアプリから私たちの瓶を削除し、クラスパスに彼らの瓶を追加します。Springセキュリティがカスタム認証プロバイダを実装するクラスの実装を選択する
セキュリティ、XMLに我々はAuthenticationProviderを実装するクラスのみを指定する必要がありますが、
現在のXMLとクラスの実装
<authentication-manager alias="authenticationManager">
<authentication-provider ref="customAuthenticationProvider"/>
</authentication-manager>
<beans:bean id="customAuthenticationProvider" class="w.x.y.z.CustomAuthenticationProvider"></beans:bean
@Component
public class CustomAuthenticationProvider implements AuthenticationProvider {
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
//Implementation
}
@Override
public boolean supports(Class<?> arg0) {
return true;
}
}
が、私はとにかくあり、任意のクラスの実装インタフェースAuthenticationProviderを選ぶために春を伝えることはできません表示されますAuthenticationProviderを実装しているクラスを選択するようSpringに指示できますか?