geosolutions-it/geostore — pull request #47 by alediator (2013-12-19 16:00:27+00:00)
Title: Auto creation of authenticated users

* Abstralize existing authethication interceptor
* Create default authentication interceptor using userService (old implementation)
* Extend this interceptor to allow users' auto creation
* Write some tests for this functionalities

Those functionalities can be activated with a property overrider with the properties:

```
geostoreAuthInterceptor.autoCreateUsers=true
geostoreAuthInterceptor.newUsersRole.role=USER
geostoreAuthInterceptor.newUsersPassword=NONE|USERNAME|FROMHEADER
geostoreAuthInterceptor.newUsersPasswordHeader=newUserPassword
```

Some documentation for this options:

* **autoCreateUsers**: Flag to indicate if an user that not exists could be created when it's used
* **newUsersRole**: New role for the user (default it's USER)
* **newUsersPassword**: New password strategy. Can be: NONE --> empty password, USERNAME --> password = username, FROMHEADER --> see newUsersPasswordHeader
* **newUsersPasswordHeader**: Header key for the new password if the selected strategy is FROMHEADER