techdev-solutions/trackr-backend — pull request #3 by daus-salar (2014-10-28 11:14:40+00:00)
Title: Modularize authentication

This work is a prerequisite for our efforts to use trackr with another authentication technique than openid.
It modularizes authentication techniques such that new login-form-based authentication types can be implemented by providing another Implementation of a `GlobalAuthenticationConfigurerAdapter` in the package `de.techdev.trackr.core.security` which is enabled when compatible to the value set in `auth.module`.
This can be easily done be using the new annotation `de.techdev.trackr.core.security.auth.AuthenticationType`.

The concept is shown with the authentication types `openid`, which was present before this PR, and `property`, which is a for demonstration purpose authentication type.
In addition to that there is a LDAP version in development.

To facilitate the implementation of other `UserDetailService` or `org.springframework.security.ldap.userdetails.UserDetailsContextMapper` there was a `UserCredentialSupport` class. It is used in `de.techdev.trackr.core.security.UserFromPropertyList` and in our current basic LDAP implementation.

The decision to migrate also `de.techdev.trackr.domain.employee.login.TrackrUserDetailsService` I would like to delegate to techdev.

But I recommend that classes in the package `de.techdev.trackr.domain` should not depend on any spring class at runtime. Annotations are acceptable. In this way reusing domain classes and business code in other applications, server or client side, is not obstructed. May be this is not the right place for this recommendation.