Search in sources :

Example 1 with RegistrationAccessToken

use of org.keycloak.services.clientregistration.RegistrationAccessToken in project keycloak by keycloak.

the class ClientRegistrationPoliciesTest method assertRegAccessToken.

private void assertRegAccessToken(String registrationAccessToken, RegistrationAuth expectedRegAuth) throws Exception {
    byte[] content = new JWSInput(registrationAccessToken).getContent();
    RegistrationAccessToken regAccessToken = JsonSerialization.readValue(content, RegistrationAccessToken.class);
    Assert.assertEquals(regAccessToken.getRegistrationAuth(), expectedRegAuth.toString().toLowerCase());
}
Also used : RegistrationAccessToken(org.keycloak.services.clientregistration.RegistrationAccessToken) JWSInput(org.keycloak.jose.jws.JWSInput)

Aggregations

JWSInput (org.keycloak.jose.jws.JWSInput)1 RegistrationAccessToken (org.keycloak.services.clientregistration.RegistrationAccessToken)1