KEYCLOAK-3671
This commit is contained in:
parent
74325fe133
commit
fbb65fa072
5 changed files with 5 additions and 5 deletions
|
@ -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.temporaryRedirect(
|
||||
Response response = Response.status(302).location(
|
||||
Urls.identityProviderAuthnRequest(context.getUriInfo().getBaseUri(), providerId, context.getRealm().getName(), accessCode))
|
||||
.build();
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ public abstract class AbstractOAuth2IdentityProvider<C extends OAuth2IdentityPro
|
|||
try {
|
||||
URI authorizationUrl = createAuthorizationUrl(request).build();
|
||||
|
||||
return Response.temporaryRedirect(authorizationUrl).build();
|
||||
return Response.status(302).location(authorizationUrl).build();
|
||||
} catch (Exception e) {
|
||||
throw new IdentityBrokerException("Could not create authentication request.", e);
|
||||
}
|
||||
|
|
|
@ -719,7 +719,7 @@ public class AccountService extends AbstractSecuredLocalService {
|
|||
clientSession.setRedirectUri(redirectUri);
|
||||
clientSession.setNote(OIDCLoginProtocol.STATE_PARAM, UUID.randomUUID().toString());
|
||||
|
||||
return Response.temporaryRedirect(
|
||||
return Response.status(302).location(
|
||||
Urls.identityProviderAuthnRequest(this.uriInfo.getBaseUri(), providerId, realm.getName(), clientSessionCode.getCode()))
|
||||
.build();
|
||||
} catch (Exception spe) {
|
||||
|
|
|
@ -163,7 +163,7 @@ public class RealmsResource {
|
|||
targetUri = KeycloakUriBuilder.fromUri(ResolveRelative.resolveRelativeUri(uriInfo.getRequestUri(), client.getRootUrl(), client.getBaseUrl())).build();
|
||||
}
|
||||
|
||||
return Response.temporaryRedirect(targetUri).build();
|
||||
return Response.status(302).location(targetUri).build();
|
||||
}
|
||||
|
||||
@Path("{realm}/login-actions")
|
||||
|
|
|
@ -82,7 +82,7 @@ public class TwitterIdentityProvider extends AbstractIdentityProvider<OAuth2Iden
|
|||
|
||||
URI authenticationUrl = URI.create(requestToken.getAuthenticationURL());
|
||||
|
||||
return Response.temporaryRedirect(authenticationUrl).build();
|
||||
return Response.status(302).location(authenticationUrl).build();
|
||||
} catch (Exception e) {
|
||||
throw new IdentityBrokerException("Could send authentication request to twitter.", e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue