KEYCLOAK-3671

This commit is contained in:
Bill Burke 2016-10-06 15:02:15 -04:00
parent fbb65fa072
commit db05dc6ee4
5 changed files with 5 additions and 5 deletions

View file

@ -64,7 +64,7 @@ public class IdentityProviderAuthenticator implements Authenticator {
for (IdentityProviderModel identityProvider : identityProviders) {
if (identityProvider.isEnabled() && providerId.equals(identityProvider.getAlias())) {
String accessCode = new ClientSessionCode(context.getRealm(), context.getClientSession()).getCode();
Response response = Response.status(302).location(
Response response = Response.seeOther(
Urls.identityProviderAuthnRequest(context.getUriInfo().getBaseUri(), providerId, context.getRealm().getName(), accessCode))
.build();

View file

@ -91,7 +91,7 @@ public abstract class AbstractOAuth2IdentityProvider<C extends OAuth2IdentityPro
try {
URI authorizationUrl = createAuthorizationUrl(request).build();
return Response.status(302).location(authorizationUrl).build();
return Response.seeOther(authorizationUrl).build();
} catch (Exception e) {
throw new IdentityBrokerException("Could not create authentication request.", e);
}

View file

@ -719,7 +719,7 @@ public class AccountService extends AbstractSecuredLocalService {
clientSession.setRedirectUri(redirectUri);
clientSession.setNote(OIDCLoginProtocol.STATE_PARAM, UUID.randomUUID().toString());
return Response.status(302).location(
return Response.seeOther(
Urls.identityProviderAuthnRequest(this.uriInfo.getBaseUri(), providerId, realm.getName(), clientSessionCode.getCode()))
.build();
} catch (Exception spe) {

View file

@ -163,7 +163,7 @@ public class RealmsResource {
targetUri = KeycloakUriBuilder.fromUri(ResolveRelative.resolveRelativeUri(uriInfo.getRequestUri(), client.getRootUrl(), client.getBaseUrl())).build();
}
return Response.status(302).location(targetUri).build();
return Response.seeOther(targetUri).build();
}
@Path("{realm}/login-actions")

View file

@ -82,7 +82,7 @@ public class TwitterIdentityProvider extends AbstractIdentityProvider<OAuth2Iden
URI authenticationUrl = URI.create(requestToken.getAuthenticationURL());
return Response.status(302).location(authenticationUrl).build();
return Response.seeOther(authenticationUrl).build();
} catch (Exception e) {
throw new IdentityBrokerException("Could send authentication request to twitter.", e);
}