v3.0.0
This commit is contained in:
@@ -64,7 +64,8 @@ public class ExtendApiCndnsApiMailAdapter extends AbstractAuthorizeAdapter {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public ModelAndView authorize(UserInfo userInfo, Object app, String data,ModelAndView modelAndView) {
|
||||
HttpsTrusts.beforeConnection();
|
||||
|
||||
|
||||
@@ -53,18 +53,21 @@ public class ExtendApiQQExmailAdapter extends AbstractAuthorizeAdapter {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public ModelAndView authorize(UserInfo userInfo, Object app, String data,ModelAndView modelAndView) {
|
||||
HttpsTrusts.beforeConnection();
|
||||
|
||||
Apps details=(Apps)app;
|
||||
String username = data.substring(0, data.indexOf("="));
|
||||
String password = data.substring(data.indexOf("=") + 1);
|
||||
_logger.trace("username " + username +" password " + password);
|
||||
//extraAttrs from Applications
|
||||
ExtraAttrs extraAttrs=null;
|
||||
if(details.getIsExtendAttr()==1){
|
||||
extraAttrs=new ExtraAttrs(details.getExtendAttr());
|
||||
}
|
||||
_logger.debug("Extra Attrs "+extraAttrs);
|
||||
OAuthClient tokenRestClient=new OAuthClient(
|
||||
String.format(TOKEN_URI,details.getPrincipal(),details.getCredentials()));
|
||||
Token token =tokenRestClient.requestAccessToken();
|
||||
|
||||
@@ -62,6 +62,7 @@ public class ExtendApiZentaoAdapter extends AbstractAuthorizeAdapter {
|
||||
if(details.getIsExtendAttr()==1){
|
||||
extraAttrs=new ExtraAttrs(details.getExtendAttr());
|
||||
}
|
||||
_logger.trace("Extra Attrs " + extraAttrs);
|
||||
String code = details.getPrincipal();
|
||||
String key = details.getCredentials();
|
||||
String time = ""+Instant.now().getEpochSecond();
|
||||
|
||||
Reference in New Issue
Block a user