Skip to content

Commit

Permalink
[SYNCOPE-1775] White noise: formatting + doc adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Sep 6, 2023
1 parent 6c5f0cb commit 852b1a0
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ protected Iterator<String> getChoices(final String input) {
AjaxDropDownChoicePanel<LogoutType> logoutType = new AjaxDropDownChoicePanel<>(
"field", "logoutType", new PropertyModel<>(clientAppTO, "logoutType"), false);
logoutType.setChoices(List.of(LogoutType.values()));
fields.add(logoutType);
fields.add(logoutType.setRequired(true));

switch (type) {
case CASSP:
fields.add(new AjaxTextFieldPanel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public abstract class ClientAppTO implements NamedEntityTO {
private String ticketExpirationPolicy;

private final List<Attr> properties = new ArrayList<>();

private LogoutType logoutType = LogoutType.NONE;

@Schema(name = "_class", requiredMode = Schema.RequiredMode.REQUIRED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ public enum LogoutType {
NONE,
BACK_CHANNEL,
FRONT_CHANNEL

}
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public interface ClientApp extends Entity {
List<Attr> getProperties();

void setProperties(List<Attr> properties);

LogoutType getLogoutType();

void setLogoutType(LogoutType logoutType);
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ ConnInstance buildConnInstanceOverride(
/**
* Removes the Spring bean for the given resource from the context.
*
* @param id Spring bean id
* @param resource external resource
*/
void unregisterConnector(ExternalResource resource);
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ protected void copyToTO(final ClientApp clientApp, final ClientAppTO clientAppTO
clientAppTO.setInformationUrl(clientApp.getInformationUrl());
clientAppTO.setPrivacyUrl(clientApp.getPrivacyUrl());
clientAppTO.setUsernameAttributeProviderConf(clientApp.getUsernameAttributeProviderConf());
clientAppTO.setLogoutType(clientApp.getLogoutType());

clientAppTO.setAuthPolicy(Optional.ofNullable(clientApp.getAuthPolicy()).
map(AuthPolicy::getKey).orElse(null));
Expand All @@ -176,6 +175,7 @@ protected void copyToTO(final ClientApp clientApp, final ClientAppTO clientAppTO
map(TicketExpirationPolicy::getKey).orElse(null));

clientAppTO.getProperties().addAll(clientApp.getProperties());
clientAppTO.setLogoutType(clientApp.getLogoutType());
}

protected SAML2SPClientAppTO getSAMLClientAppTO(final SAML2SPClientApp clientApp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ https://apereo.github.io/cas/6.6.x/integration/Attribute-Release-PrincipalId-Att
. <<policies-attribute-release,attribute release policy>>
. <<policies-ticket-expiration,ticket expiration policy>>
. additional properties
. logout type, mapping to
https://apereo.github.io/cas/6.6.x/installation/Logout-Single-Signout.html#slo-requests[the equivalent CAS setting^]

More parameters are required to be specified depending on the actual client application type.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected void setCommon(final BaseWebBasedRegisteredService service, final Clie
(existing, replacement) -> existing));
service.setProperties(properties);
}

service.setLogoutType(RegisteredServiceLogoutType.valueOf(clientApp.getLogoutType().name()));
}

Expand Down

0 comments on commit 852b1a0

Please sign in to comment.