Move session iframe pages (#14769)

Closes #14767
This commit is contained in:
Stian Thorgersen 2022-10-13 08:16:20 +02:00 committed by GitHub
parent 8ea3f30d82
commit ded52c6228
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 6 additions and 7 deletions

View file

@ -30,9 +30,6 @@
<build> <build>
<resources> <resources>
<resource>
<directory>static</directory>
</resource>
<resource> <resource>
<directory>dist</directory> <directory>dist</directory>
</resource> </resource>

View file

@ -15,11 +15,13 @@
* limitations under the License. * limitations under the License.
*/ */
package org.keycloak.services.util; package org.keycloak.protocol.oidc.endpoints;
import org.keycloak.common.Version; import org.keycloak.common.Version;
import org.keycloak.headers.SecurityHeadersProvider; import org.keycloak.headers.SecurityHeadersProvider;
import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.util.CacheControlUtil;
import org.keycloak.services.util.P3PHelper;
import javax.ws.rs.core.CacheControl; import javax.ws.rs.core.CacheControl;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@ -37,7 +39,7 @@ public class IframeUtil {
cacheControl = CacheControlUtil.noCache(); cacheControl = CacheControlUtil.noCache();
} }
InputStream resource = IframeUtil.class.getClassLoader().getResourceAsStream(fileName); InputStream resource = IframeUtil.class.getResourceAsStream(fileName);
if (resource != null) { if (resource != null) {
P3PHelper.addP3PHeader(); P3PHelper.addP3PHeader();
session.getProvider(SecurityHeadersProvider.class).options().allowAnyFrameAncestor(); session.getProvider(SecurityHeadersProvider.class).options().allowAnyFrameAncestor();

View file

@ -33,7 +33,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo; import javax.ws.rs.core.UriInfo;
import java.util.Set; import java.util.Set;
import static org.keycloak.services.util.IframeUtil.returnIframeFromResources; import static org.keycloak.protocol.oidc.endpoints.IframeUtil.returnIframeFromResources;
/** /**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>

View file

@ -27,7 +27,7 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import static org.keycloak.services.util.IframeUtil.returnIframeFromResources; import static org.keycloak.protocol.oidc.endpoints.IframeUtil.returnIframeFromResources;
/** /**
* @author Vaclav Muzikar <vmuzikar@redhat.com> * @author Vaclav Muzikar <vmuzikar@redhat.com>