|
|
|
@ -7,6 +7,8 @@ import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -19,6 +21,7 @@ import java.time.Duration;
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
public class GatewayOAuthRegister implements DeviceRegister {
|
|
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
public static final String CLIENT_TYPE = "oauthclient";
|
|
|
|
|
private MerchantInfoProvider provider;
|
|
|
|
|
private AuthHistoryMapper authHistoryMapper;
|
|
|
|
@ -60,7 +63,7 @@ public class GatewayOAuthRegister implements DeviceRegister {
|
|
|
|
|
JSONObject client = provider.getClientInfo(clientId);
|
|
|
|
|
auth.put("client_moniker", client.getString("client_moniker"));
|
|
|
|
|
auth.put("client", client);
|
|
|
|
|
|
|
|
|
|
logger.debug("dev info:{}", auth.toJSONString());
|
|
|
|
|
return auth;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|