From c89a412661a3335827da23d17d710960fabf8aec Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Fri, 12 Jun 2015 13:32:02 +0200 Subject: [PATCH] KEYCLOAK-1321 Error page is displayed if user rejects sign in with social provider --- .../org/keycloak/broker/provider/IdentityProvider.java | 8 ++++++-- .../broker/oidc/AbstractOAuth2IdentityProvider.java | 9 ++++++--- .../services/resources/IdentityBrokerService.java | 10 ++++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/IdentityProvider.java b/broker/core/src/main/java/org/keycloak/broker/provider/IdentityProvider.java index 47037fae22..1d775eec5c 100755 --- a/broker/core/src/main/java/org/keycloak/broker/provider/IdentityProvider.java +++ b/broker/core/src/main/java/org/keycloak/broker/provider/IdentityProvider.java @@ -36,7 +36,7 @@ import javax.ws.rs.core.UriInfo; */ public interface IdentityProvider extends Provider { - public interface AuthenticationCallback { + interface AuthenticationCallback { /** * This method should be called by provider after the JAXRS callback endpoint has finished authentication * with the remote IDP @@ -44,7 +44,11 @@ public interface IdentityProvider extends Provi * @param context * @return */ - public Response authenticated(BrokeredIdentityContext context); + Response authenticated(BrokeredIdentityContext context); + + Response cancelled(String code); + + Response error(String code, String message); } diff --git a/broker/oidc/src/main/java/org/keycloak/broker/oidc/AbstractOAuth2IdentityProvider.java b/broker/oidc/src/main/java/org/keycloak/broker/oidc/AbstractOAuth2IdentityProvider.java index b80949af2f..376210db27 100755 --- a/broker/oidc/src/main/java/org/keycloak/broker/oidc/AbstractOAuth2IdentityProvider.java +++ b/broker/oidc/src/main/java/org/keycloak/broker/oidc/AbstractOAuth2IdentityProvider.java @@ -58,6 +58,7 @@ public abstract class AbstractOAuth2IdentityProvider