Example usage for org.springframework.security.access.intercept.aopalliance MethodSecurityInterceptor isAlwaysReauthenticate

List of usage examples for org.springframework.security.access.intercept.aopalliance MethodSecurityInterceptor isAlwaysReauthenticate

Introduction

In this page you can find the example usage for org.springframework.security.access.intercept.aopalliance MethodSecurityInterceptor isAlwaysReauthenticate.

Prototype

public boolean isAlwaysReauthenticate() 

Source Link

Usage

From source file:com.ebay.pulsar.analytics.spring.security.GlobalSecuritySettingTest.java

@Test
public void testUtils() throws Exception {

    MethodSecurityInterceptor interceptor = Mockito.mock(MethodSecurityInterceptor.class);
    when(interceptor.isAlwaysReauthenticate()).thenReturn(false).thenReturn(true);
    GlobalSecuritySetting gss = new GlobalSecuritySetting();
    ReflectFieldUtil.setField(gss, "interceptor", interceptor);
    gss.afterPropertiesSet();/* w w  w. j  a v  a 2  s .  c  o m*/
    Assert.assertTrue(interceptor.isAlwaysReauthenticate());
}