use of com.okta.idx.sdk.api.response.IDXResponse in project okta-idx-java by okta.
the class AuthenticationTransaction method fillOutIdps.
private void fillOutIdps(AuthenticationResponse authenticationResponse) {
if (idxResponse == null || idxResponse.remediation() == null) {
return;
}
List<Idp> idpList = new LinkedList<>();
RemediationOption[] remediationOptions = this.getResponse().remediation().remediationOptions();
List<RemediationOption> remediationOptionList = Arrays.stream(remediationOptions).filter(x -> "redirect-idps".equals(x.getName()) || "redirect-idp".equals(x.getName())).collect(Collectors.toList());
for (RemediationOption remediationOption : remediationOptionList) {
idpList.add(new Idp(remediationOption.getType(), remediationOption.getHref()));
}
authenticationResponse.setIdps(idpList);
}
Aggregations