views:

1442

answers:

1

both spring authentication provider and authentication processing filter also need to register with authenticationManager?

authentication provider i can use custom-authentication-provider tag

but what is different spring authentication provider and authentication processing filter ?

+3  A: 

The authentication manager uses all authentication providers to authenticate authenticationtokens it has to authenticate.

The authentication processing filter just adds a token (username password). Other filters add tokens too. For example the AnonymousProcessingFilter.

The idea is to seperate token generation from token authentication. That way you could implement stuff like authentication against multiple sources easily.

The regular case is one provider per token generator.

squiddle