Chapter 5. Authenticating with Spring MVC

This chapter covers the following recipes:

  • Configuring Apache HTTP to proxy your Tomcat(s)
  • Adapting users and roles to fit Spring Security
  • Authenticating over a BASIC scheme
  • Storing credentials in a REST environment
  • Authenticating with a third-party OAuth2 scheme
  • Authorizing on services and controllers

Introduction

In this chapter, developing the CloudStreetMarket application, we cover two ways of authenticating in a Spring environment.

We believe that only providing Security annotations to restrict controllers and services wouldn't be sufficient to give a big picture of Spring Authentication. It's clearly not possible to feel confident about the Security tools that can be used with Spring MVC, without a few key concepts such as the role of the Authentication object, the Spring Security filter-chain, the SecurityInterceptor workflow, and so on. As it is necessary for configuring OAuth, we will also show you how to set up an Apache HTTP proxy and a host alias on your machine to emulate the cloudstreetmarket.com domain locally.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset