AuthN | Java SDK | Flow Endpoints
Flow Endpoints
Check a token
check(String token)Look up a token and return its contents.
ClientTokenCheckResponse response = client.client().token().check("ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a");
Complete sign-up/sign-in
complete(String flowID)Complete a sign-up or sign-in flow.
FlowCompleteResponse response = client.flow().complete("pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh");
Start a sign-up/sign-in flow
start(FlowStartRequest request)Start a new sign-up or sign-in flow.
FlowType[] flowTypes = new FlowType[]{FlowType.SIGNIN,FlowType.SIGNUP};
FlowStartRequest request = new FlowStartRequest.Builder()
.setEmail("joe.user@email.com")
.setCbURI("https://www.myserver.com/callback")
.setFlowType(flowTypes)
.setInvitation("pmc_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a")
.build();
FlowStartResponse response = client.flow().start(request);
Restart a sign-up/sign-in flow
restart(FlowRestartRequest request)Restart a sign-up/sign-in flow choice.
FlowRestartRequest request = new FlowRestartRequest.Builder(
"pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
FlowChoice.PASSWORD,
new FlowRestartData()
).build();
FlowRestartResponse response = client.flow().restart(request);
Update a sign-up/sign-in flow
update(FlowUpdateRequest request)Update a sign-up/sign-in flow.
FlowUpdateData data = new FlowUpdateData();
data.password = "somenewpassword";
FlowUpdateRequest request = new FlowUpdateRequest.Builder(
"pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
FlowChoice.PASSWORD,
data
).build();
FlowUpdateResponse response = client.flow().update(request);