Java 类org.springframework.security.web.authentication.HttpStatusEntryPoint 实例源码

项目:spring-security-oauth2-boot    文件:CustomOAuth2SsoWithAuthenticationEntryPointConfigurationTests.java   
@Override
public void configure(HttpSecurity http) throws Exception {
    http.antMatcher("/ui/**").authorizeRequests().antMatchers("/ui/test")
            .permitAll().anyRequest().authenticated().and().exceptionHandling()
            .authenticationEntryPoint(
                    new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED));
}
项目:role-api    文件:SecurityConfiguration.java   
/**
 * {@inheritDoc}
 */
@Override
protected void configure(HttpSecurity http) throws Exception {
    http.authorizeRequests().anyRequest().fullyAuthenticated()
            .and().httpBasic().authenticationEntryPoint(new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED))
            .and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
            .and().csrf().disable();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:CustomOAuth2SsoWithAuthenticationEntryPointConfigurationTests.java   
@Override
public void configure(HttpSecurity http) throws Exception {
    http.antMatcher("/ui/**").authorizeRequests().antMatchers("/ui/test")
            .permitAll().anyRequest().authenticated().and().exceptionHandling()
            .authenticationEntryPoint(
                    new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED));
}
项目:spring-boot-concourse    文件:CustomOAuth2SsoWithAuthenticationEntryPointConfigurationTests.java   
@Override
public void configure(HttpSecurity http) throws Exception {
    http.antMatcher("/ui/**").authorizeRequests().antMatchers("/ui/test")
            .permitAll().anyRequest().authenticated().and().exceptionHandling()
            .authenticationEntryPoint(
                    new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED));
}
项目:oma-riista-web    文件:WebSecurityConfig.java   
@Bean
public HttpStatusEntryPoint authenticationEntryPoint() {
    return new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED);
}
项目:autopivot    文件:SecurityConfig.java   
/**
 * Returns the default {@link AuthenticationEntryPoint} to use
 * for the fallback basic HTTP authentication.
 *
 * @return The default {@link AuthenticationEntryPoint} for the
 *         fallback HTTP basic authentication.
 */
@Bean(name=BASIC_AUTH_BEAN_NAME)
public AuthenticationEntryPoint basicAuthenticationEntryPoint() {
    return new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED);
}