Class GalaxyRedirectionEndpointController


  • @Controller
    public class GalaxyRedirectionEndpointController
    extends java.lang.Object
    Controller for handling OAuth2 authorization codes for the Galaxy exporter
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getGalaxyRedirect​(java.lang.String baseURL)
      Get the URL for the galaxy redirection location.
      java.lang.String passAuthCode​(org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session)
      Receive the OAuth2 authorization code from IRIDA and pass it on to the client-side code
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GalaxyRedirectionEndpointController

        public GalaxyRedirectionEndpointController()
    • Method Detail

      • passAuthCode

        @RequestMapping("galaxy/auth_code")
        public java.lang.String passAuthCode​(org.springframework.ui.Model model,
                                             javax.servlet.http.HttpServletRequest request,
                                             javax.servlet.http.HttpSession session)
                                      throws org.apache.oltu.oauth2.common.exception.OAuthProblemException,
                                             java.lang.IllegalStateException
        Receive the OAuth2 authorization code from IRIDA and pass it on to the client-side code
        Parameters:
        model - the model to write to
        request - the incoming request
        session - the user's session
        Returns:
        a template that will pass on the authorization code
        Throws:
        org.apache.oltu.oauth2.common.exception.OAuthProblemException - if a valid OAuth authorization response cannot be created
        java.lang.IllegalStateException - if the callback URL is removed from an invalid session
      • getGalaxyRedirect

        public static java.lang.String getGalaxyRedirect​(java.lang.String baseURL)
        Get the URL for the galaxy redirection location. This will be needed for the oauth flow to get its token.
        Parameters:
        baseURL - The server's base URL
        Returns:
        the URL of the galaxy oauth redirect location.