Class GalaxyRedirectionEndpointController
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.oauth.GalaxyRedirectionEndpointController
-
@Controller public class GalaxyRedirectionEndpointController extends java.lang.Object
Controller for handling OAuth2 authorization codes for the Galaxy exporter
-
-
Constructor Summary
Constructors Constructor Description GalaxyRedirectionEndpointController()
-
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
-
-
-
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 torequest
- the incoming requestsession
- 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 createdjava.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.
-
-