Let's take a look at the following steps:
- The ProviderSignInController controller is initialized with an authentication SignInAdapter, which is used to complete a provider sign-in attempt by signing in the local user account with the specified ID:
//src/main/java/com/packtpub/springsecurity/configuration/ SocialConfig.java @Bean public SignInAdapter authSignInAdapter() { return (userId, connection, request) -> { SocialAuthenticationUtils.authenticate(connection); return null; }; }
- In the SingInAdapter bean, from the preceding code snippet, we used a custom authentication utility method to create an Authentication object in the form of UsernamePasswordAuthenticationToken, and added it to SecurityContext based ...