Example usage for org.springframework.security.config.annotation.authentication.builders AuthenticationManagerBuilder inMemoryAuthentication

List of usage examples for org.springframework.security.config.annotation.authentication.builders AuthenticationManagerBuilder inMemoryAuthentication

Introduction

In this page you can find the example usage for org.springframework.security.config.annotation.authentication.builders AuthenticationManagerBuilder inMemoryAuthentication.

Prototype

public InMemoryUserDetailsManagerConfigurer<AuthenticationManagerBuilder> inMemoryAuthentication()
        throws Exception 

Source Link

Document

Add in memory authentication to the AuthenticationManagerBuilder and return a InMemoryUserDetailsManagerConfigurer to allow customization of the in memory authentication.

Usage

From source file:org.zalando.stups.stupsback.admin.config.SecurityConfiguration.java

@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
    auth.inMemoryAuthentication().withUser("admin").password(adminPassword).roles("USER", "ADMIN");
}

From source file:ca.unx.template.config.SpringSecurityConfiguration.java

@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
    auth.inMemoryAuthentication().withUser("admin").password("password").roles("USER", "ADMIN").and()
            .withUser("user").password("password").roles("USER");
}

From source file:shiver.me.timbers.spring.security.integration.JwtCustomPrincipleSecurityConfigurationAnnotation.java

@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
    auth.inMemoryAuthentication().withUser("user").password("password").roles("USER");
}

From source file:com.crec.controller.config.WebSecurityConfig.java

@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
    auth.inMemoryAuthentication().withUser("fabrice").password("fab123").roles("USER").and().withUser("paulson")
            .password("bond").roles("ADMIN", "USER");
}

From source file:hu.fnf.devel.wishbox.gateway.SecurityConfiguration.java

@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
    auth.inMemoryAuthentication().withUser("API_KEY").password("API_PASS").roles("USER").and()
            .withUser("API_KEY_ADMIN").password("API_PASS_ADMIN").roles("USER");
}

From source file:org.moserp.common.security.TestSecurityConfiguration.java

@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
    auth.inMemoryAuthentication().withUser("user").password("password").roles("USER").and().withUser("admin")
            .password("password").roles("USER", "ADMIN");
}

From source file:eu.trentorise.game.config.NoSecurityConfig.java

@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
    auth.inMemoryAuthentication();

}

From source file:org.oesf.eque.web.security.WebSecurityConfig.java

@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
    auth.inMemoryAuthentication().withUser("guest").password("guest").roles("GUEST").and().withUser("user")
            .password("user").roles("USER").and().withUser("admin").password("admin").roles("ADMIN");
}

From source file:shiver.me.timbers.spring.security.integration.JwtAnnotationSecurityConfiguration.java

@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
    auth.inMemoryAuthentication().withUser("user").password("password").roles("USER");
    auth.inMemoryAuthentication().withUser("role1").password("password").roles("ONE");
    auth.inMemoryAuthentication().withUser("role2").password("password").roles("TWO");
}

From source file:fi.codecenter.courses.SpringSecurityConfig.java

/**
 * At minimum configuration must be provided for the authentication manager,
 * ie. how is the user authenticated and where does the user data come from.
 *
 * @param auth//from   w  w w .  j a  va  2 s  .c om
 * @throws Exception
 */
@Override
public void configure(AuthenticationManagerBuilder auth) throws Exception {
    auth.inMemoryAuthentication().withUser("user").password("password").roles("USER");
}