Configuring web security

The first thing we need to do is create a custom web security configuration. Create a config package in com.example.messenger.api. Add a WebSecurityConfig class to the package and input the following code: 

package com.example.messenger.api.configimport com.example.messenger.api.filters.JWTAuthenticationFilterimport com.example.messenger.api.filters.JWTLoginFilterimport com.example.messenger.api.services.AppUserDetailsServiceimport org.springframework.context.annotation.Configurationimport org.springframework.http.HttpMethodimport org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilderimport org.springframework.security.config.annotation.web.builders.HttpSecurityimport  ...

Get Kotlin Programming By Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.