Search in sources :

Example 1 with ConsumerAuthUtil

use of com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil in project apollo by ctripcorp.

the class SkipAuthorizationConfiguration method consumerAuthUtil.

@Primary
@Bean
public ConsumerAuthUtil consumerAuthUtil() {
    final ConsumerAuthUtil mock = mock(ConsumerAuthUtil.class);
    when(mock.getConsumerId(any())).thenReturn(1L);
    return mock;
}
Also used : ConsumerAuthUtil(com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil) Primary(org.springframework.context.annotation.Primary) Bean(org.springframework.context.annotation.Bean)

Aggregations

ConsumerAuthUtil (com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil)1 Bean (org.springframework.context.annotation.Bean)1 Primary (org.springframework.context.annotation.Primary)1