use of org.keycloak.representations.idm.ClientInitialAccessPresentation in project keycloak by keycloak.
the class AbstractRegCliTest method issueInitialAccessToken.
String issueInitialAccessToken(String realm) {
ClientInitialAccessResource resource = adminClient.realm(realm).clientInitialAccess();
ClientInitialAccessCreatePresentation rep = new ClientInitialAccessCreatePresentation();
rep.setCount(10);
rep.setExpiration(100);
ClientInitialAccessPresentation response = resource.create(rep);
String token = response.getToken();
Assert.assertNotNull("Issued initial access token not null", token);
return token;
}
use of org.keycloak.representations.idm.ClientInitialAccessPresentation in project keycloak by keycloak.
the class AbstractClientPoliciesTest method setInitialAccessTokenForDynamicClientRegistration.
protected void setInitialAccessTokenForDynamicClientRegistration() {
// get initial access token for Dynamic Client Registration with authentication
reg = ClientRegistration.create().url(suiteContext.getAuthServerInfo().getContextRoot() + "/auth", REALM_NAME).build();
ClientInitialAccessPresentation token = adminClient.realm(REALM_NAME).clientInitialAccess().create(new ClientInitialAccessCreatePresentation(0, 10));
reg.auth(Auth.token(token));
}
Aggregations