You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
454 B
18 lines
454 B
4 years ago
|
package com.fr.plugin.demo.third.auth;
|
||
|
|
||
|
import com.fr.decision.fun.impl.AbstractAccessProvider;
|
||
|
import com.fr.plugin.transform.FunctionRecorder;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @author chf
|
||
|
* @date 2020/9/24 14:43
|
||
|
*/
|
||
|
@FunctionRecorder
|
||
|
public class CustomAccessProvider extends AbstractAccessProvider {
|
||
|
@Override
|
||
|
public String access(String username, String password, String thirdToken) {
|
||
|
return thirdToken.startsWith(username) ? username : thirdToken;
|
||
|
}
|
||
|
}
|