Search in sources :

Example 1 with ClientInitialAccessResource

use of org.keycloak.admin.client.resource.ClientInitialAccessResource 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;
}
Also used : ClientInitialAccessResource(org.keycloak.admin.client.resource.ClientInitialAccessResource) ClientInitialAccessCreatePresentation(org.keycloak.representations.idm.ClientInitialAccessCreatePresentation) ClientInitialAccessPresentation(org.keycloak.representations.idm.ClientInitialAccessPresentation)

Aggregations

ClientInitialAccessResource (org.keycloak.admin.client.resource.ClientInitialAccessResource)1 ClientInitialAccessCreatePresentation (org.keycloak.representations.idm.ClientInitialAccessCreatePresentation)1 ClientInitialAccessPresentation (org.keycloak.representations.idm.ClientInitialAccessPresentation)1