-
Notifications
You must be signed in to change notification settings - Fork 6
Authentication
Hippoom edited this page Jun 29, 2017
·
1 revision
You can extend WeChatMpWebSecurityConfigurerAdapter
to customize protected resources:
import com.github.hippoom.wechat.mp.autoconfigure.security.web.WeChatMpWebSecurityConfigurerAdapter;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
@Configuration
@RequiredArgsConstructor
public class HttpSecurityConfig extends WeChatMpWebSecurityConfigurerAdapter {
@Override
protected void configureAuthorizeRequests(HttpSecurity httpSecurity)
throws Exception {
// @formatter:off
httpSecurity
.antMatcher("/**").authorizeRequests()
.antMatchers("/rel/**/me").authenticated()
.anyRequest().permitAll();
// @formatter:on
}
}
- Quick start
- weixin-java-mp support
- Autowiring WxMpConfigStorage
- API support
- Inbound messaging
- Identity & Access
- JS SDK support
- Testing
- Release notes