@PublicApi
public interface FlowRequestService
| Modifier and Type | Method and Description |
|---|---|
FlowRequest |
createFlowRequest(javax.servlet.http.HttpSession session,
ClientConfiguration clientConfiguration,
Function<String,String> clientCallbackUrl)
Creates the flow request
|
FlowResult |
getFlowResult(javax.servlet.http.HttpSession session,
String flowRequestId)
Returns stored flow result.
|
@Nonnull FlowRequest createFlowRequest(@Nonnull javax.servlet.http.HttpSession session, @Nonnull ClientConfiguration clientConfiguration, @Nonnull Function<String,String> clientCallbackUrl) throws IllegalArgumentException, IllegalStateException
session - session, in which the data will be storedclientConfiguration - endpoints to hit and required credentialsclientCallbackUrl - function that, based on id, will produce url that the flow will be redirected to
after obtaining the token;FlowRequest contains the redirect url and idIllegalArgumentException - thrown if the provided arguments are invalid, e.g. clientConfiguration
endpoints are not httpsIllegalStateException - thrown if the session is invalidated, or base URL is not https
(TODO: update this doc depending on the decision from go/j/KRAK-3359)@Nonnull FlowResult getFlowResult(@Nonnull javax.servlet.http.HttpSession session, @Nonnull String flowRequestId) throws IllegalArgumentException
flowRequestId -
subsequent calls will fail.session - session to fetch the result from; has to be the same session
as provided to {createFlowRequest(HttpSession, ClientConfiguration, Function)}flowRequestId - the id of the FlowRequest from {createFlowRequest(HttpSession, ClientConfiguration, Function)}FlowResult containing either ClientToken or FlowRequestError if error occurredIllegalArgumentException - if there is no result for corresponding flowRequestIdCopyright © 2020 Atlassian. All rights reserved.