Class RemoteAPIController


  • @Controller
    @RequestMapping("/remote_api")
    public class RemoteAPIController
    extends BaseController
    Controller handling basic operations for listing, viewing, adding, and removing RemoteAPIs
    • Field Detail

      • PARENT_FRAME_RELOAD_PAGE

        public static final java.lang.String PARENT_FRAME_RELOAD_PAGE
        See Also:
        Constant Field Values
    • Method Detail

      • list

        @RequestMapping
        public java.lang.String list()
        Get the remote apis listing page
        Returns:
        The view name of the remote apis listing page
      • connectToAPI

        @RequestMapping("/connect/{apiId}")
        public java.lang.String connectToAPI​(@PathVariable
                                             java.lang.Long apiId,
                                             org.springframework.ui.Model model)
        Initiate a token request on a remote api if one does not yet exist. Works with handleOAuthException(HttpServletRequest, IridaOAuthException) to initiate the request.
        Parameters:
        apiId - the ID of the api to connect to
        model - the model to add attributes to.
        Returns:
        The name of the PARENT_FRAME_RELOAD_PAGE view
      • handleOAuthException

        @ExceptionHandler(IridaOAuthException.class)
        public java.lang.String handleOAuthException​(javax.servlet.http.HttpServletRequest request,
                                                     IridaOAuthException ex)
                                              throws org.apache.oltu.oauth2.common.exception.OAuthSystemException
        Handle an IridaOAuthException by launching an authentication flow
        Parameters:
        request - The incoming request method
        ex - The thrown exception
        Returns:
        A redirect to the OltuAuthorizationController's authentication
        Throws:
        org.apache.oltu.oauth2.common.exception.OAuthSystemException - if the request cannot be authenticated.