mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
doc
This commit is contained in:
@@ -34,10 +34,11 @@ public StoryResult token(StoryParam story) {
|
||||
`TokenValidator`是一个函数式接口,可以直接使用Lambda表达式,示例代码如下:
|
||||
|
||||
```java
|
||||
public class ZuulConfig extends AlipayZuulConfiguration {
|
||||
@Component
|
||||
public class MyConfig {
|
||||
|
||||
@Override
|
||||
protected void doAfter() {
|
||||
@PostConstruct
|
||||
public void after() {
|
||||
ApiConfig.getInstance().setTokenValidator(apiParam -> {
|
||||
// 获取客户端传递过来的token
|
||||
String token = apiParam.fetchAccessToken();
|
||||
|
Reference in New Issue
Block a user