Code to accompany this blog article.
Provides a scala-based alternative to the usual Spring Security namespace with similar syntax, but which is compatible with Spring's @Configuration
features. It is no more complicated than namespace syntax, but is more powerful and intuitive as it directly exposes the actual classes which are usually hidden. By using higher-order functions, it makes it easy to plug in new behaviour for features such as access-control (interceptUrl
), which can be implemented as Scala functions.
The code is built and run using sbt
- Download and install version 0.12.3
cd scalasec
sbt
Then from the sbt prompt, build and run using
update
compile
container:start
Browse to http://localhost:8080/anyurl/
Log in in with any username and password=username.