necouchman commented on a change in pull request #455: GUACAMOLE-361: CAS global logout URL: https://github.com/apache/guacamole-client/pull/455#discussion_r354483861
########## File path: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/form/CASLogoutField.java ########## @@ -0,0 +1,82 @@ +/* * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.guacamole.auth.cas.form; + +import java.net.URI; +import javax.ws.rs.core.UriBuilder; +import org.apache.guacamole.form.Field; +import org.apache.guacamole.GuacamoleException; +import org.apache.guacamole.auth.cas.conf.ConfigurationService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * Field definition used to redirect a user to CAS logout + */ +public class CASLogoutField extends Field { + + private static final Logger logger = LoggerFactory.getLogger(CASLogoutField.class); + + public static final String PARAMETER_NAME = "logout"; + + /** + * The standard URI name for the CAS logout resource. + */ + private static final String CAS_LOGOUT_URI = "logout"; + + /** + * The full URI which the field should link to. + */ + private final URI logoutURI; + + /** + * Service for retrieving CAS configuration information. + */ + private ConfigurationService confService; + + /** + * Mimics the CAS ticket routine but calls logout... + * + * @param authorizationEndpoint + * The full URL of the CAS logout URI + * + * @param logoutURI + * The URI that Guacamole should redirect the user's browser to + * in order to logout + */ + public CASLogoutField(URI logoutURI) { + + // Init base field properties + super(PARAMETER_NAME, "GUAC_CAS_LOGOUT"); + this.logoutURI = logoutURI; + } Review comment: Missing space on this line - or remove the space above the first line of the method. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
