All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.emc.documentum.springdata.security.SecurityConfiguration Maven / Gradle / Ivy

The newest version!
package com.emc.documentum.springdata.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
/**
 * Copyright (c) 2015 EMC Corporation. All Rights Reserved.
 * EMC Confidential: Restricted Internal Distribution
 */

/**
 * @author  Raman Walia
 */
@Configuration
@EnableGlobalMethodSecurity
@EnableWebSecurity
@ComponentScan("com.emc.documentum.springdata.security.*")

public class SecurityConfiguration extends WebSecurityConfigurerAdapter{

    @Autowired
    DocumentumAuthenticationProvider dctmAuthProvider;

    /**
     * This section defines the user accounts which can be used for
     * authentication as well as the roles each user has.
     */
    @Override
    public void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.authenticationProvider(dctmAuthProvider);
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
            .authorizeRequests().anyRequest().authenticated()
            .and()
            .httpBasic();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy