|
|
|
@ -17,13 +17,6 @@
|
|
|
|
|
|
|
|
|
|
package org.mitre.uma.web; |
|
|
|
|
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
import static org.mitre.oauth2.web.AuthenticationUtilities.ensureOAuthScope; |
|
|
|
|
import static org.mitre.util.JsonUtils.getAsLong; |
|
|
|
|
import static org.mitre.util.JsonUtils.getAsStringSet; |
|
|
|
|
|
|
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
import org.mitre.oauth2.model.SystemScope; |
|
|
|
@ -34,17 +27,15 @@ import org.mitre.uma.model.PermissionTicket;
|
|
|
|
|
import org.mitre.uma.model.ResourceSet; |
|
|
|
|
import org.mitre.uma.service.PermissionService; |
|
|
|
|
import org.mitre.uma.service.ResourceSetService; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.http.HttpStatus; |
|
|
|
|
import org.springframework.http.ResponseEntity; |
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
|
|
import org.springframework.security.core.Authentication; |
|
|
|
|
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception; |
|
|
|
|
import org.springframework.security.oauth2.provider.error.WebResponseExceptionTranslator; |
|
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
|
import org.springframework.ui.Model; |
|
|
|
|
import org.springframework.util.MimeTypeUtils; |
|
|
|
|
import org.springframework.web.bind.annotation.ExceptionHandler; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod; |
|
|
|
@ -54,6 +45,10 @@ import com.google.gson.JsonObject;
|
|
|
|
|
import com.google.gson.JsonParseException; |
|
|
|
|
import com.google.gson.JsonParser; |
|
|
|
|
|
|
|
|
|
import static org.mitre.oauth2.web.AuthenticationUtilities.ensureOAuthScope; |
|
|
|
|
import static org.mitre.util.JsonUtils.getAsLong; |
|
|
|
|
import static org.mitre.util.JsonUtils.getAsStringSet; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author jricher |
|
|
|
|
* |
|
|
|
|