@Bean
    // Add the authentication providers to the manager.
    AuthenticationManager authenticationManager(final DaoAuthenticationProvider daoAuthenticationProvider) {
        final List<AuthenticationProvider> providers = new ArrayList<>();
        providers.add(daoAuthenticationProvider);
        return new ProviderManager(providers);
    }
The security configuration. If you use spring security for web applications most of the stuff is already configured.

@author Daniel Theuke (daniel.theuke@heuboe.de)
examples/security-grpc-server/src/main/java/net/devh/boot/grpc/examples/security/server/SecurityConfiguration.java