Class InMemoryUserDetailsManager

java.lang.Object
com.codename1.backend.security.core.userdetails.InMemoryUserDetailsManager
All Implemented Interfaces:
UserDetailsManager, UserDetailsPasswordService, UserDetailsService

public class InMemoryUserDetailsManager extends Object implements UserDetailsManager, UserDetailsPasswordService

Users kept in memory: for a demonstration, a test, or a server whose handful of accounts is part of its configuration. Names are compared without regard to ASCII case, and every lookup returns a copy, so erasing the credentials of a signed-in user does not erase the stored ones.

@Bean
UserDetailsService users() {
    return new InMemoryUserDetailsManager(
            User.withUsername("ada").password("{noop}secret").roles("USER").build());
}

The accounts live in this process only and are gone when it stops.