Search in sources :

Example 16 with HttpFacade

use of org.keycloak.adapters.spi.HttpFacade in project keycloak by keycloak.

the class ClaimInformationPointProviderTest method testBodyClaimsInformationPoint.

@Test
public void testBodyClaimsInformationPoint() {
    HttpFacade httpFacade = createHttpFacade(new HashMap<>(), new ByteArrayInputStream("raw-body-text".getBytes()));
    Map<String, List<String>> claims = getClaimInformationProviderForPath("/claims-provider", "claims").resolve(httpFacade);
    assertEquals("raw-body-text", claims.get("claim-from-body").get(0));
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) OIDCHttpFacade(org.keycloak.adapters.OIDCHttpFacade) HttpFacade(org.keycloak.adapters.spi.HttpFacade) List(java.util.List) Test(org.junit.Test) AbstractKeycloakTest(org.keycloak.testsuite.AbstractKeycloakTest)

Aggregations

HttpFacade (org.keycloak.adapters.spi.HttpFacade)16 OIDCHttpFacade (org.keycloak.adapters.OIDCHttpFacade)8 List (java.util.List)6 Test (org.junit.Test)6 AbstractKeycloakTest (org.keycloak.testsuite.AbstractKeycloakTest)6 SimpleHttpFacade (org.keycloak.adapters.springsecurity.facade.SimpleHttpFacade)5 KeycloakDeployment (org.keycloak.adapters.KeycloakDeployment)4 ByteArrayInputStream (java.io.ByteArrayInputStream)3 SamlDeployment (org.keycloak.adapters.saml.SamlDeployment)3 AuthChallenge (org.keycloak.adapters.spi.AuthChallenge)3 AuthOutcome (org.keycloak.adapters.spi.AuthOutcome)3 JsonParser (com.fasterxml.jackson.core.JsonParser)2 TreeNode (com.fasterxml.jackson.core.TreeNode)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 HashMap (java.util.HashMap)2 RefreshableKeycloakSecurityContext (org.keycloak.adapters.RefreshableKeycloakSecurityContext)2 AbstractInitiateLogin (org.keycloak.adapters.saml.AbstractInitiateLogin)2 SamlAuthenticator (org.keycloak.adapters.saml.SamlAuthenticator)2 SamlSession (org.keycloak.adapters.saml.SamlSession)2 SamlSessionStore (org.keycloak.adapters.saml.SamlSessionStore)2