AuthenticationProviders are tried in order until one provides a non-null response. A non-null response indicates the provider had authority to decide on the authentication request and no further providers are tried.
AuthenticationProvider
It simply accepts as valid whatever is contained within the TestingAuthenticationToken.
TestingAuthenticationToken
The purpose of this implementation is to facilitate unit testing.
The principal and credentials should be set with an Object that provides the respective property via its Object.toString() method.
principal
credentials
Object
Object.toString()