ZhuDongming
2020-04-26 dba54bf8c8f9299d61c05bf3a941708ea399c998
src/main/java/com/moral/controller/TokenController.java
@@ -1,8 +1,14 @@
package com.moral.controller;
import com.moral.entity.auth.AuthToken;
import java.util.Arrays;
import java.util.LinkedHashMap;
import org.apache.commons.codec.binary.Base64;
import org.springframework.http.*;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -10,8 +16,7 @@
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;
import java.util.Arrays;
import java.util.LinkedHashMap;
import com.moral.entity.auth.AuthToken;
@Controller
public class TokenController {
@@ -34,7 +39,6 @@
            token.setRefresh_token((String)map.get("refresh_token"));
            token.setExpires_in((Integer)map.get("expires_in"));
            token.setScope((String)map.get("scope"));
            System.out.println(token);
        }
        return token;
    }