Skip to content

Commit

Permalink
Merge pull request #183 from georchestra/using-controller-not-restcon…
Browse files Browse the repository at this point in the history
…troller-for-login

fix: switch login/logout controller to plain Controller annotation
  • Loading branch information
pmauduit authored Feb 13, 2025
2 parents a2a287f + 6ed6c01 commit 8c07159
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,28 @@
*/
package org.georchestra.gateway.app;

import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

import javax.annotation.PostConstruct;

import org.apache.commons.lang3.tuple.Pair;
import org.georchestra.gateway.security.GeorchestraGatewaySecurityConfigProperties;
import org.georchestra.gateway.security.GeorchestraGatewaySecurityConfigProperties.Server;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientProperties;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
import javax.annotation.PostConstruct;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

// We have to use the @Controller annotation, not the @RestController one
// here, so that the login/logout page will go through the thymeleaf templating
// system.
@Controller
public class LoginLogoutController {

private @Autowired(required = false) GeorchestraGatewaySecurityConfigProperties georchestraGatewaySecurityConfigProperties;
Expand Down

0 comments on commit 8c07159

Please sign in to comment.