Search in sources :

Example 1 with SecurityHeadersProvider

use of org.keycloak.headers.SecurityHeadersProvider in project keycloak by keycloak.

the class KeycloakSecurityHeadersFilter method filter.

@Override
public void filter(ContainerRequestContext containerRequestContext, ContainerResponseContext containerResponseContext) {
    KeycloakSession session = Resteasy.getContextData(KeycloakSession.class);
    SecurityHeadersProvider securityHeadersProvider = session.getProvider(SecurityHeadersProvider.class);
    securityHeadersProvider.addHeaders(containerRequestContext, containerResponseContext);
}
Also used : KeycloakSession(org.keycloak.models.KeycloakSession) SecurityHeadersProvider(org.keycloak.headers.SecurityHeadersProvider)

Aggregations

SecurityHeadersProvider (org.keycloak.headers.SecurityHeadersProvider)1 KeycloakSession (org.keycloak.models.KeycloakSession)1