AuthenticationProvider を介してカスタム認証を実装する webapp があります。これで問題なく動作します。ただし、AuthenticationProvider を実装する独自の認証クラスを実装するオプションを顧客に提供したいと考えています。そのため、アプリから jar を削除し、jar をクラスパスに追加します。
AuthenticationProvider を実装するクラスのみを指定する必要があるセキュリティ xml に表示されますが、インターフェイス AuthenticationProvider を実装するクラスを選択するように Spring に指示することはできません
現在の 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 を実装する任意のクラスを選択するように春に指示できるものはありますか?