use of org.gluu.oxtrust.model.OptionEntry in project oxTrust by GluuFederation.
the class PassportIdpInitiatedAction method addAuthParam.
public void addAuthParam() {
StringBuilder scopesBuilder = new StringBuilder();
scopes.forEach(e -> {
scopesBuilder.append(e);
scopesBuilder.append(" ");
});
StringBuilder typesBuilder = new StringBuilder();
responseTypes.forEach(e -> {
typesBuilder.append(e);
typesBuilder.append(" ");
});
if (isValid()) {
this.authzParam.setScopes(scopesBuilder.toString().trim());
this.authzParam.setResponseType(typesBuilder.toString().trim());
this.authzParam.setExtraParams(options.stream().filter(e -> e.getKey() != null).collect(Collectors.toMap(OptionEntry::getKey, OptionEntry::getValue)));
if (this.isEdition) {
this.authzParams.remove(this.previousParam);
this.authzParams.add(this.authzParam);
} else {
this.authzParams.add(this.authzParam);
}
this.showForm = false;
this.isEdition = false;
this.authzParam = new AuthzParams();
this.previousParam = null;
this.options.clear();
save();
} else {
facesMessages.add(FacesMessage.SEVERITY_ERROR, "All fields are required.");
}
}
Aggregations