Class AccessTokenController

java.lang.Object
de.uniba.minf.core.rest.controller.BaseRestController<T>
de.uniba.minf.registry.controller.user.BaseUserRestController<RegistryAccessToken>
de.uniba.minf.registry.controller.user.AccessTokenController

@RestController @RequestMapping("/api/v1/tokens/{userUID}") public class AccessTokenController extends BaseUserRestController<RegistryAccessToken>
  • Constructor Details

    • AccessTokenController

      public AccessTokenController()
  • Method Details

    • getUserAccessTokens

      @GetMapping public de.uniba.minf.core.rest.model.RestItemsResponse getUserAccessTokens(@PathVariable("userUID") String userUID, jakarta.servlet.http.HttpServletRequest request, Locale locale) throws de.uniba.minf.core.rest.exception.ApiInsufficientPermissionsException, de.uniba.minf.core.rest.exception.ApiItemNotFoundException
      Throws:
      de.uniba.minf.core.rest.exception.ApiInsufficientPermissionsException
      de.uniba.minf.core.rest.exception.ApiItemNotFoundException
    • getUserAccessToken

      @GetMapping("/{tokenUID}") public de.uniba.minf.core.rest.model.RestItemResponse getUserAccessToken(@PathVariable("userUID") String userUID, @PathVariable("tokenUID") String tokenUID, jakarta.servlet.http.HttpServletRequest request, Locale locale) throws de.uniba.minf.core.rest.exception.ApiInsufficientPermissionsException, de.uniba.minf.core.rest.exception.ApiItemNotFoundException
      Throws:
      de.uniba.minf.core.rest.exception.ApiInsufficientPermissionsException
      de.uniba.minf.core.rest.exception.ApiItemNotFoundException
    • deleteUserAccessToken

      @DeleteMapping("/{tokenUID}") public de.uniba.minf.core.rest.model.RestItemResponse deleteUserAccessToken(@PathVariable("userUID") String userUID, @PathVariable("tokenUID") String tokenUID, jakarta.servlet.http.HttpServletRequest request, Locale locale) throws de.uniba.minf.core.rest.exception.ApiInsufficientPermissionsException, de.uniba.minf.core.rest.exception.ApiItemNotFoundException
      Throws:
      de.uniba.minf.core.rest.exception.ApiInsufficientPermissionsException
      de.uniba.minf.core.rest.exception.ApiItemNotFoundException
    • updateUserAccessToken

      @PostMapping("/{tokenUID}") public de.uniba.minf.core.rest.model.RestItemResponse updateUserAccessToken(@PathVariable("userUID") String userUID, @PathVariable("tokenUID") String tokenUID, @RequestBody RegistryAccessToken updatedToken, jakarta.servlet.http.HttpServletRequest request, Locale locale) throws de.uniba.minf.core.rest.exception.ApiInsufficientPermissionsException, de.uniba.minf.core.rest.exception.ApiItemNotFoundException
      Throws:
      de.uniba.minf.core.rest.exception.ApiInsufficientPermissionsException
      de.uniba.minf.core.rest.exception.ApiItemNotFoundException
    • saveNewUserAccessToken

      @PostMapping public de.uniba.minf.core.rest.model.RestItemResponse saveNewUserAccessToken(@PathVariable("userUID") String userUID, @RequestBody(required=false) RegistryAccessToken newToken, jakarta.servlet.http.HttpServletRequest request, Locale locale) throws de.uniba.minf.core.rest.exception.ApiRuntimeException
      Throws:
      de.uniba.minf.core.rest.exception.ApiRuntimeException