From 6963b3c5d5820f4b0a8569aa7123acce4043e853 Mon Sep 17 00:00:00 2001 From: Joe Grandja Date: Tue, 10 Oct 2017 17:52:47 -0400 Subject: [PATCH] Expose login page config for oauth2Login Fixes gh-4570 --- .../configurers/oauth2/client/OAuth2LoginConfigurer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurer.java b/config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurer.java index 0ef139cdd9..e17bd7ddf4 100644 --- a/config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurer.java +++ b/config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurer.java @@ -72,6 +72,12 @@ public final class OAuth2LoginConfigurer> exten return this; } + @Override + public OAuth2LoginConfigurer loginPage(String loginPage) { + Assert.hasText(loginPage, "loginPage cannot be empty"); + return super.loginPage(loginPage); + } + public AuthorizationEndpointConfig authorizationEndpoint() { return this.authorizationEndpointConfig; }