
Learn to build a Spring MVC web app with security, configure multiple contexts, implement authentication providers such as Google and GitHub, and secure content with Java configuration and password hashing.
Install Tomcat on Mac using Homebrew, configure user access for the manager app, and set up Eclipse server integration to start and run Tomcat successfully.
Install and configure MySQL on mac using terminal, start the MySQL service, connect without a password, and create a user and schema with privileges.
Configure a Spring MVC template by creating a web app in Eclipse, setting Java 9 and Maven compiler, and adding Spring MVC, logging, and spin dependencies for testing.
Configure a dispatcher servlet to map subjects to controllers in Spring MVC, initialize the application context with all controllers and their views, and enable MVC namespace.
Learn how a Spring MVC controller intercepts requests, builds a model, and uses request mapping to dispatch to views, including creating a controller class and enabling component scanning.
Learn how to pass data from a controller to a view using model, model map, and model and view, and render attributes like name in a GSP page.
Explore how Spring mvc handles request parameters with @RequestParam, including required versus optional parameters, default values, and how missing values influence request handling and rendered responses.
Learn how Spring MVC uses the @PathVariable annotation to bind path segments to controller method parameters, including naming the variable in mappings and testing with real requests.
Learn to set the context config location using the cell read context parameter, define the app context, and configure dispatchers and web app config files.
Explore configuring multiple web application contexts within a Spring MVC app, including admin subcontexts, URL mappings, and trailing slash behavior to ensure consistent request handling.
Set up a root context and dispatcher servlet contexts in Spring MVC. Learn to register listeners and enable component scanning for shared beans.
Remove web.xml by bootstrapping a Spring MVC app with a programmatic dispatcher setup, configuring application contexts for user and admin, and mapping requests to the appropriate subcontexts.
Replace the dispatcher servlet xml with a java configuration that enables mvc, scans components, and sets up a view resolver with prefix and suffix for the customer and admin paths.
Upgrade your Spring MVC project by migrating from XML to Java configuration to initialize the root context and web application context, removing root-context.xml.
Explore writing and running Spring MVC unit tests, configuring test contexts, and validating controller responses with mock contexts and assertions.
Learn how to integrate Spring MVC with Spring Security using a base configuration, detailing authentication versus authorization, dependency setup, dispatcher servlet, and security context configuration.
Learn how to configure Spring MVC and security by adding a filter, filter mapping, and an authentication manager, then enable a default login page for secure HTTP requests.
Learn how to configure an authentication manager and provider in spring security, wire an in-memory user service with authorities, and enforce pattern-based access with login and logout.
Explore how to hash a plaintext password using bcrypt encoder, store the hash, and enable authentication with user authorities in a Spring MVC security context.
Learn how to customize a login page in a spring mvc security setup by creating a login controller, routing to a gsp login view, and configuring access for anonymous users.
this lecture demonstrates enabling csrf protection in a spring mvc app, configuring csrf tokens in login and form submissions, and redeploying to validate guarded requests.
Customize login form field names in Spring MVC and security by mapping username and password parameters to the authentication process, adjusting form attributes, and validating the updated security configuration.
Demonstrate how to disable and lock a user in a Spring MVC security context, using a brief demo to toggle attributes and illustrate admin versus invalid login suspensions.
Move index.jsp to the views folder and implement login handling by detecting anonymous users via the security context, managing authentication and authorities in a Spring MVC app.
Learn to use the authorize tag in GSP to render page sections based on the authenticated principal's roles, showing asset management and training management while hiding others.
Explore using the authenticate tag to render the current user's principal name and email in a Spring MVC app, wiring security context into the login controller and view.
Learn to load the servlet context programmatically in a Spring MVC project by initializing the web application context, registering a dispatcher as front controller, and enabling a security context.
Configure a Java-based web application context by defining a @Configuration class, enabling web mvc, scanning components, and setting up resource handlers and an internal resource resolver with prefix and suffix.
Upgrade your spring mvc app by loading the security context via java configuration instead of remote config, and implement in-memory user authentication and password encoding within the security configuration.
Configure a Spring database connection and implement a repository class to access data, including setting up a data source, MySQL schema, and basic SQL operations.
Learn to integrate a Spring MVC app with a DAO authentication provider, using a database-backed user service, repository access, and a password encoder for secure login.
Configure jsp support inside Spring Boot by wiring dependencies and embedding Tomcat. Set spring.mvc.view.prefix and spring.mvc.view.suffix to route login.jsp in the views.
Learn how to migrate an MVC project to Spring Boot by copying configuration, adding security dependencies, and updating the context, static resources, and GSP views for a functional application.
Configure Google as an authentication provider in a Spring MVC security setup by creating a developer console app, obtaining client id and secret, and wiring the redirect flow.
Register your application in the Google developer console, create a new project, configure the OAuth consent screen, and generate a client ID and secret for your spring security course integration.
Configure Google as the authentication provider in Spring Security by integrating OAuth2 login, adding Google client credentials to application properties, and validating the login flow.
Configure GitHub as the authentication provider using the default OAuth2 login form by adding client id and secret to the application properties and validating the OAuth2 login flow.
Learn how to customize the OAuth2 login page for providers like Google by configuring authorization requests, consent screens, and switching to a provider-based login flow.
Configure authorities by email in a spring mvc security setup. Create users and authorities tables and replace passwords with email for email-based authentication.
Learn how to implement a userinfo endpoint to retrieve authenticated user claims from an access token, using a delegation-based service to interact with the OAuth2 providers.
Implement a user info endpoint to access claims in an OpenId OAuth2 setup, configure a user service, and map provider authorities like email and name for secure login.
Map user authorities from the provider in a standard OAuth2 flow by extracting the email attribute, creating granted authorities, and wiring them to the user repository.
Map the user's authorities from the OpenID connect provider (Google) into a custom user input class, configure security context, and display the authenticated user name to replace random IDs.
Learn to map the username from the security context in standard oauth2 and OpenId Connect by using the principal object, replacing random numbers with the actual user name.
Explore Spring mvc setup from basic configurations to controllers, view resolves, and security, including login forms, authentication management, password encoding, csrf, and programmatic handlers.
Basically the course is divided into 2 major sections
Web part
Security part.
We are going to start off by making a basic spring mvc web application, and will learn how to apply security to different parts of the application.Then we are going to add on the more advanced features inside application i.e. configuration of multiple web application context inside application plus implementation of DAO authentication provider inside our application, and than we are going to explore how to integrate and implement OAuth2 features inside our application
It's a super hands on course.
My goal at this course is to get you through the entire process of configuring and implementing security inside a spring project
Web
In the web section of this course, we are going to start off with most basic configurations of the DispatcherServlet then we are going to create our first controller, and will look into functionalities that how controller component Intercepts incoming requests plus how it sends the data to Model for further processing then we are going to explore request param, and pathvariable annotations plus we are also going to explore how to configure multiple web application context, and root context. We are going to do all these steps both via xml configurations and java configurations
Security - Basics
In Security-Basics section of this course, we are going to explore how to implement the basic security with a default login form. Later in the section, we are going to explore authentication provider, authentication managers, and we are going to use them inside our project. We are also going to create our own customize login form then we are going to use authenticate and authorize tag inside our application to implement how to display contents based on the assigned authorities
Java Configurations
In Java configurations section of this course, we are going to explore, how to configure the ServletContext programmatically instead of configuring it via web.xml. Later in the section, We are going to integrate our application with DaoAuthenticationProvider to use user names, and roles configured in database tables
Spring boot
In Spring boot section of this course, we are going to migrate our application to spring boot
Spring OAuth2
In Spring OAuth2 section of this course, we are going to explore OAuth2 plus we are also going to explore how to customize application to use OAuth2 for authorization mechanism, and we are going to use Google and GitHub as the authentication provider. We are going to start off by configuring our application to use google and github as the authentication Provider’s with the default oAuth2Login form. Later we are going to customize login page for the authentication providers then we are going to explore how to use UserInfo endpoint to access the claims of the authenticated end-user plus we are also going to explore explore standard OAuth 2.0 Provider’s implementation of OAuth2UserService plus the implementation of OAuth2UserService with OpenIDConnect ,and lastly, we are going to explore how to map the authorities of the user for the provider having standard OAuth2 implementation, and Open id connect implementation