| | |
| | | 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; |
| | |
| | | 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 { |
| | |
| | | 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; |
| | | } |