Search in sources :

Example 1 with CommandException

use of org.jboss.aesh.console.command.CommandException in project keycloak by keycloak.

the class AbstractRequestCmd method process.

public CommandResult process(CommandInvocation commandInvocation) throws CommandException, InterruptedException {
    // see if Content-Type header is explicitly set to non-json value
    Header ctype = headers.get("content-type");
    InputStream content = null;
    CmdStdinContext<JsonNode> ctx = new CmdStdinContext<>();
    if (file != null) {
        if (ctype != null && !"application/json".equals(ctype.getValue())) {
            if ("-".equals(file)) {
                content = System.in;
            } else {
                try {
                    content = new BufferedInputStream(new FileInputStream(file));
                } catch (FileNotFoundException e) {
                    throw new RuntimeException("File not found: " + file);
                }
            }
        } else {
            ctx = parseFileOrStdin(file);
        }
    } else if (body != null) {
        content = new ByteArrayInputStream(body.getBytes(StandardCharsets.UTF_8));
    }
    ConfigData config = loadConfig();
    config = copyWithServerInfo(config);
    setupTruststore(config, commandInvocation);
    String auth = null;
    config = ensureAuthInfo(config, commandInvocation);
    config = copyWithServerInfo(config);
    if (credentialsAvailable(config)) {
        auth = ensureToken(config);
    }
    auth = auth != null ? "Bearer " + auth : null;
    if (auth != null) {
        headers.addIfMissing("Authorization", auth);
    }
    final String server = config.getServerUrl();
    final String realm = getTargetRealm(config);
    final String adminRoot = adminRestRoot != null ? adminRestRoot : composeAdminRoot(server);
    String resourceUrl = composeResourceUrl(adminRoot, realm, url);
    String typeName = extractTypeNameFromUri(resourceUrl);
    if (filter.size() > 0) {
        resourceUrl = HttpUtil.addQueryParamsToUri(resourceUrl, filter);
    }
    headers.addIfMissing("Accept", "application/json");
    if (isUpdate() && mergeMode) {
        ObjectNode result;
        HeadersBodyStatus response;
        try {
            response = HttpUtil.doGet(resourceUrl, new HeadersBody(headers));
            checkSuccess(resourceUrl, response);
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            copyStream(response.getBody(), buffer);
            result = MAPPER.readValue(buffer.toByteArray(), ObjectNode.class);
        } catch (IOException e) {
            throw new RuntimeException("HTTP request error: " + e.getMessage(), e);
        }
        CmdStdinContext<JsonNode> ctxremote = new CmdStdinContext<>();
        ctxremote.setResult(result);
        // merge local representation over remote one
        if (ctx.getResult() != null) {
            ReflectionUtil.merge(ctx.getResult(), (ObjectNode) ctxremote.getResult());
        }
        ctx = ctxremote;
    }
    if (attrs.size() > 0) {
        if (content != null) {
            throw new RuntimeException("Can't set attributes on content of type other than application/json");
        }
        ctx = mergeAttributes(ctx, MAPPER.createObjectNode(), attrs);
    }
    if (content == null && ctx.getContent() != null) {
        content = new ByteArrayInputStream(ctx.getContent().getBytes(StandardCharsets.UTF_8));
    }
    ReturnFields returnFields = null;
    if (fields != null) {
        returnFields = new ReturnFields(fields);
    }
    // make sure content type is set
    if (content != null) {
        headers.addIfMissing("Content-Type", "application/json");
    }
    LinkedHashMap<String, String> queryParams = new LinkedHashMap<>();
    if (offset != null) {
        queryParams.put("first", String.valueOf(offset));
    }
    if (limit != null) {
        queryParams.put("max", String.valueOf(limit));
    }
    if (queryParams.size() > 0) {
        resourceUrl = HttpUtil.addQueryParamsToUri(resourceUrl, queryParams);
    }
    HeadersBodyStatus response;
    try {
        response = HttpUtil.doRequest(httpVerb, resourceUrl, new HeadersBody(headers, content));
    } catch (IOException e) {
        throw new RuntimeException("HTTP request error: " + e.getMessage(), e);
    }
    // output response
    if (printHeaders) {
        printOut(response.getStatus());
        for (Header header : response.getHeaders()) {
            printOut(header.getName() + ": " + header.getValue());
        }
    }
    checkSuccess(resourceUrl, response);
    AccessibleBufferOutputStream abos = new AccessibleBufferOutputStream(System.out);
    if (response.getBody() == null) {
        throw new RuntimeException("Internal error - response body should never be null");
    }
    if (printHeaders) {
        printOut("");
    }
    Header location = response.getHeaders().get("Location");
    String id = location != null ? extractLastComponentOfUri(location.getValue()) : null;
    if (id != null) {
        if (returnId) {
            printOut(id);
        } else if (!outputResult) {
            printErr("Created new " + typeName + " with id '" + id + "'");
        }
    }
    if (outputResult) {
        if (isCreateOrUpdate() && (response.getStatusCode() == 204 || id != null)) {
            // get object for id
            headers = new Headers();
            if (auth != null) {
                headers.add("Authorization", auth);
            }
            try {
                String fetchUrl = id != null ? (resourceUrl + "/" + id) : resourceUrl;
                response = doGet(fetchUrl, new HeadersBody(headers));
            } catch (IOException e) {
                throw new RuntimeException("HTTP request error: " + e.getMessage(), e);
            }
        }
        Header contentType = response.getHeaders().get("content-type");
        boolean canPrettyPrint = contentType != null && contentType.getValue().equals("application/json");
        boolean pretty = !compressed;
        if (canPrettyPrint && (pretty || returnFields != null)) {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            copyStream(response.getBody(), buffer);
            try {
                JsonNode rootNode = MAPPER.readValue(buffer.toByteArray(), JsonNode.class);
                if (returnFields != null) {
                    rootNode = applyFieldFilter(MAPPER, rootNode, returnFields);
                }
                if (outputFormat == OutputFormat.JSON) {
                    // now pretty print it to output
                    MAPPER.writeValue(abos, rootNode);
                } else {
                    printAsCsv(rootNode, returnFields, unquoted);
                }
            } catch (Exception ignored) {
                copyStream(new ByteArrayInputStream(buffer.toByteArray()), abos);
            }
        } else {
            copyStream(response.getBody(), abos);
        }
    }
    int lastByte = abos.getLastByte();
    if (lastByte != -1 && lastByte != 13 && lastByte != 10) {
        printErr("");
    }
    return CommandResult.SUCCESS;
}
Also used : HeadersBodyStatus(org.keycloak.client.admin.cli.util.HeadersBodyStatus) Headers(org.keycloak.client.admin.cli.util.Headers) FileNotFoundException(java.io.FileNotFoundException) JsonNode(com.fasterxml.jackson.databind.JsonNode) LinkedHashMap(java.util.LinkedHashMap) BufferedInputStream(java.io.BufferedInputStream) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) ReturnFields(org.keycloak.client.admin.cli.util.ReturnFields) BufferedInputStream(java.io.BufferedInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) FileInputStream(java.io.FileInputStream) InputStream(java.io.InputStream) AccessibleBufferOutputStream(org.keycloak.client.admin.cli.util.AccessibleBufferOutputStream) HeadersBody(org.keycloak.client.admin.cli.util.HeadersBody) ByteArrayOutputStream(java.io.ByteArrayOutputStream) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException) CommandException(org.jboss.aesh.console.command.CommandException) Header(org.keycloak.client.admin.cli.util.Header) ByteArrayInputStream(java.io.ByteArrayInputStream) ConfigData(org.keycloak.client.admin.cli.config.ConfigData) CmdStdinContext(org.keycloak.client.admin.cli.common.CmdStdinContext)

Example 2 with CommandException

use of org.jboss.aesh.console.command.CommandException in project keycloak by keycloak.

the class ConfigCredentialsCmd method process.

public CommandResult process(CommandInvocation commandInvocation) throws CommandException, InterruptedException {
    // check server
    if (server == null) {
        throw new IllegalArgumentException("Required option not specified: --server");
    }
    try {
        new URL(server);
    } catch (Exception e) {
        throw new RuntimeException("Invalid server endpoint url: " + server, e);
    }
    if (realm == null)
        throw new IllegalArgumentException("Required option not specified: --realm");
    String signedRequestToken = null;
    boolean clientSet = clientId != null;
    applyDefaultOptionValues();
    String grantTypeForAuthentication = null;
    if (user != null) {
        grantTypeForAuthentication = OAuth2Constants.PASSWORD;
        printErr("Logging into " + server + " as user " + user + " of realm " + realm);
        // if user was set there needs to be a password so we can authenticate
        if (password == null) {
            password = readSecret("Enter password: ", commandInvocation);
        }
        // if secret was set to be read from stdin, then ask for it
        if ("-".equals(secret) && keystore == null) {
            secret = readSecret("Enter client secret: ", commandInvocation);
        }
    } else if (keystore != null || secret != null || clientSet) {
        grantTypeForAuthentication = OAuth2Constants.CLIENT_CREDENTIALS;
        printErr("Logging into " + server + " as " + "service-account-" + clientId + " of realm " + realm);
        if (keystore == null) {
            if (secret == null) {
                secret = readSecret("Enter client secret: ", commandInvocation);
            }
        }
    }
    if (keystore != null) {
        if (secret != null) {
            throw new IllegalArgumentException("Can't use both --keystore and --secret");
        }
        if (!new File(keystore).isFile()) {
            throw new RuntimeException("No such keystore file: " + keystore);
        }
        if (storePass == null) {
            storePass = readSecret("Enter keystore password: ", commandInvocation);
            keyPass = readSecret("Enter key password: ", commandInvocation);
        }
        if (keyPass == null) {
            keyPass = storePass;
        }
        if (alias == null) {
            alias = clientId;
        }
        String realmInfoUrl = server + "/realms/" + realm;
        signedRequestToken = AuthUtil.getSignedRequestToken(keystore, storePass, keyPass, alias, sigLifetime, clientId, realmInfoUrl);
    }
    // if only server and realm are set, just save config and be done
    if (user == null && secret == null && keystore == null) {
        getHandler().saveMergeConfig(config -> {
            config.setServerUrl(server);
            config.setRealm(realm);
        });
        return CommandResult.SUCCESS;
    }
    setupTruststore(copyWithServerInfo(loadConfig()), commandInvocation);
    // now use the token endpoint to retrieve access token, and refresh token
    AccessTokenResponse tokens = signedRequestToken != null ? getAuthTokensByJWT(server, realm, user, password, clientId, signedRequestToken) : secret != null ? getAuthTokensBySecret(server, realm, user, password, clientId, secret) : getAuthTokens(server, realm, user, password, clientId);
    Long sigExpiresAt = signedRequestToken == null ? null : System.currentTimeMillis() + sigLifetime * 1000;
    // save tokens to config file
    saveTokens(tokens, server, realm, clientId, signedRequestToken, sigExpiresAt, secret, grantTypeForAuthentication);
    return CommandResult.SUCCESS;
}
Also used : File(java.io.File) AccessTokenResponse(org.keycloak.representations.AccessTokenResponse) URL(java.net.URL) CommandException(org.jboss.aesh.console.command.CommandException)

Example 3 with CommandException

use of org.jboss.aesh.console.command.CommandException in project keycloak by keycloak.

the class GetCmd method execute.

@Override
public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException {
    try {
        if (printHelp()) {
            return help ? CommandResult.SUCCESS : CommandResult.FAILURE;
        }
        processGlobalOptions();
        if (args == null || args.isEmpty()) {
            throw new IllegalArgumentException("CLIENT not specified");
        }
        if (args.size() > 1) {
            throw new IllegalArgumentException("Invalid option: " + args.get(1));
        }
        String clientId = args.get(0);
        EndpointType regType = endpoint != null ? EndpointType.of(endpoint) : EndpointType.DEFAULT;
        if (clientId.startsWith("-")) {
            warnfErr(ParseUtil.CLIENT_OPTION_WARN, clientId);
        }
        ConfigData config = loadConfig();
        config = copyWithServerInfo(config);
        if (token == null) {
            // if registration access token is not set via -t, try use the one from configuration
            token = getRegistrationToken(config.sessionRealmConfigData(), clientId);
        }
        setupTruststore(config, commandInvocation);
        String auth = token;
        if (auth == null) {
            config = ensureAuthInfo(config, commandInvocation);
            config = copyWithServerInfo(config);
            if (credentialsAvailable(config)) {
                auth = ensureToken(config);
            }
        }
        auth = auth != null ? "Bearer " + auth : null;
        final String server = config.getServerUrl();
        final String realm = config.getRealm();
        InputStream response = doGet(server + "/realms/" + realm + "/clients-registrations/" + regType.getEndpoint() + "/" + urlencode(clientId), APPLICATION_JSON, auth);
        try {
            String json = readFully(response);
            Object result = null;
            switch(regType) {
                case DEFAULT:
                    {
                        ClientRepresentation client = JsonSerialization.readValue(json, ClientRepresentation.class);
                        result = client;
                        saveMergeConfig(cfg -> {
                            setRegistrationToken(cfg.ensureRealmConfigData(server, realm), client.getClientId(), client.getRegistrationAccessToken());
                        });
                        break;
                    }
                case OIDC:
                    {
                        OIDCClientRepresentation client = JsonSerialization.readValue(json, OIDCClientRepresentation.class);
                        result = client;
                        saveMergeConfig(cfg -> {
                            setRegistrationToken(cfg.ensureRealmConfigData(server, realm), client.getClientId(), client.getRegistrationAccessToken());
                        });
                        break;
                    }
                case INSTALL:
                    {
                        result = JsonSerialization.readValue(json, AdapterConfig.class);
                        break;
                    }
                case SAML2:
                    {
                        break;
                    }
                default:
                    {
                        throw new RuntimeException("Unexpected type: " + regType);
                    }
            }
            if (!compressed && result != null) {
                json = JsonSerialization.writeValueAsPrettyString(result);
            }
            printOut(json);
        // } catch (UnrecognizedPropertyException e) {
        // throw new RuntimeException("Failed to parse returned JSON - " + e.getMessage(), e);
        } catch (IOException e) {
            throw new RuntimeException("Failed to process HTTP response", e);
        }
        return CommandResult.SUCCESS;
    } catch (IllegalArgumentException e) {
        throw new IllegalArgumentException(e.getMessage() + suggestHelp(), e);
    } finally {
        commandInvocation.stop();
    }
}
Also used : APPLICATION_JSON(org.keycloak.client.registration.cli.util.HttpUtil.APPLICATION_JSON) CMD(org.keycloak.client.registration.cli.util.OsUtil.CMD) CommandResult(org.jboss.aesh.console.command.CommandResult) CommandDefinition(org.jboss.aesh.cl.CommandDefinition) AuthUtil.ensureToken(org.keycloak.client.registration.cli.util.AuthUtil.ensureToken) ConfigUtil.setRegistrationToken(org.keycloak.client.registration.cli.util.ConfigUtil.setRegistrationToken) IoUtil.printOut(org.keycloak.client.registration.cli.util.IoUtil.printOut) ConfigUtil.saveMergeConfig(org.keycloak.client.registration.cli.util.ConfigUtil.saveMergeConfig) CommandInvocation(org.jboss.aesh.console.command.invocation.CommandInvocation) HttpUtil.doGet(org.keycloak.client.registration.cli.util.HttpUtil.doGet) ParseUtil(org.keycloak.client.registration.cli.util.ParseUtil) EndpointType(org.keycloak.client.registration.cli.common.EndpointType) ConfigUtil.getRegistrationToken(org.keycloak.client.registration.cli.util.ConfigUtil.getRegistrationToken) IoUtil.warnfErr(org.keycloak.client.registration.cli.util.IoUtil.warnfErr) EOL(org.keycloak.client.registration.cli.util.OsUtil.EOL) OIDCClientRepresentation(org.keycloak.representations.oidc.OIDCClientRepresentation) PrintWriter(java.io.PrintWriter) HttpUtil.urlencode(org.keycloak.client.registration.cli.util.HttpUtil.urlencode) Arguments(org.jboss.aesh.cl.Arguments) StringWriter(java.io.StringWriter) DEFAULT_CONFIG_FILE_STRING(org.keycloak.client.registration.cli.util.ConfigUtil.DEFAULT_CONFIG_FILE_STRING) IOException(java.io.IOException) ConfigUtil.loadConfig(org.keycloak.client.registration.cli.util.ConfigUtil.loadConfig) ClientRepresentation(org.keycloak.representations.idm.ClientRepresentation) JsonSerialization(org.keycloak.util.JsonSerialization) ConfigUtil.credentialsAvailable(org.keycloak.client.registration.cli.util.ConfigUtil.credentialsAvailable) PROMPT(org.keycloak.client.registration.cli.util.OsUtil.PROMPT) Option(org.jboss.aesh.cl.Option) List(java.util.List) CommandException(org.jboss.aesh.console.command.CommandException) IoUtil.readFully(org.keycloak.client.registration.cli.util.IoUtil.readFully) AdapterConfig(org.keycloak.representations.adapters.config.AdapterConfig) ConfigData(org.keycloak.client.registration.cli.config.ConfigData) InputStream(java.io.InputStream) OIDCClientRepresentation(org.keycloak.representations.oidc.OIDCClientRepresentation) ConfigData(org.keycloak.client.registration.cli.config.ConfigData) InputStream(java.io.InputStream) EndpointType(org.keycloak.client.registration.cli.common.EndpointType) IOException(java.io.IOException) OIDCClientRepresentation(org.keycloak.representations.oidc.OIDCClientRepresentation) ClientRepresentation(org.keycloak.representations.idm.ClientRepresentation)

Example 4 with CommandException

use of org.jboss.aesh.console.command.CommandException in project keycloak by keycloak.

the class NewObjectCmd method process.

public CommandResult process(CommandInvocation commandInvocation) throws CommandException, InterruptedException {
    List<AttributeOperation> attrs = new LinkedList<>();
    Iterator<String> it = args.iterator();
    while (it.hasNext()) {
        String option = it.next();
        switch(option) {
            case "-s":
            case "--set":
                {
                    if (!it.hasNext()) {
                        throw new IllegalArgumentException("Option " + option + " requires a value");
                    }
                    String[] keyVal = parseKeyVal(it.next());
                    attrs.add(new AttributeOperation(SET, keyVal[0], keyVal[1]));
                    break;
                }
            default:
                {
                    throw new IllegalArgumentException("Invalid option: " + option);
                }
        }
    }
    InputStream body = null;
    CmdStdinContext<JsonNode> ctx = new CmdStdinContext<>();
    if (file != null) {
        ctx = parseFileOrStdin(file);
    }
    if (attrs.size() > 0) {
        ctx = mergeAttributes(ctx, MAPPER.createObjectNode(), attrs);
    }
    if (body == null && ctx.getContent() != null) {
        body = new ByteArrayInputStream(ctx.getContent().getBytes(StandardCharsets.UTF_8));
    }
    AccessibleBufferOutputStream abos = new AccessibleBufferOutputStream(System.out);
    if (!compressed) {
        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
        copyStream(body, buffer);
        try {
            JsonNode rootNode = MAPPER.readValue(buffer.toByteArray(), JsonNode.class);
            // now pretty print it to output
            MAPPER.writeValue(abos, rootNode);
        } catch (Exception ignored) {
            copyStream(new ByteArrayInputStream(buffer.toByteArray()), abos);
        }
    } else {
        copyStream(body, System.out);
    }
    int lastByte = abos.getLastByte();
    if (lastByte != -1 && lastByte != 13 && lastByte != 10) {
        printErr("");
    }
    return CommandResult.SUCCESS;
}
Also used : AttributeOperation(org.keycloak.client.admin.cli.common.AttributeOperation) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) AccessibleBufferOutputStream(org.keycloak.client.admin.cli.util.AccessibleBufferOutputStream) JsonNode(com.fasterxml.jackson.databind.JsonNode) ByteArrayOutputStream(java.io.ByteArrayOutputStream) LinkedList(java.util.LinkedList) CommandException(org.jboss.aesh.console.command.CommandException) ByteArrayInputStream(java.io.ByteArrayInputStream) CmdStdinContext(org.keycloak.client.admin.cli.common.CmdStdinContext)

Example 5 with CommandException

use of org.jboss.aesh.console.command.CommandException in project keycloak by keycloak.

the class ConfigCredentialsCmd method process.

public CommandResult process(CommandInvocation commandInvocation) throws CommandException, InterruptedException {
    // check server
    if (server == null) {
        throw new IllegalArgumentException("Required option not specified: --server");
    }
    try {
        new URL(server);
    } catch (Exception e) {
        throw new RuntimeException("Invalid server endpoint url: " + server, e);
    }
    if (realm == null)
        throw new IllegalArgumentException("Required option not specified: --realm");
    String signedRequestToken = null;
    boolean clientSet = clientId != null;
    applyDefaultOptionValues();
    String grantTypeForAuthentication = null;
    if (user != null) {
        grantTypeForAuthentication = OAuth2Constants.PASSWORD;
        printErr("Logging into " + server + " as user " + user + " of realm " + realm);
        // if user was set there needs to be a password so we can authenticate
        if (password == null) {
            password = readSecret("Enter password: ", commandInvocation);
        }
        // if secret was set to be read from stdin, then ask for it
        if ("-".equals(secret) && keystore == null) {
            secret = readSecret("Enter client secret: ", commandInvocation);
        }
    } else if (keystore != null || secret != null || clientSet) {
        grantTypeForAuthentication = OAuth2Constants.CLIENT_CREDENTIALS;
        printErr("Logging into " + server + " as " + "service-account-" + clientId + " of realm " + realm);
        if (keystore == null) {
            if (secret == null) {
                secret = readSecret("Enter client secret: ", commandInvocation);
            }
        }
    }
    if (keystore != null) {
        if (secret != null) {
            throw new IllegalArgumentException("Can't use both --keystore and --secret");
        }
        if (!new File(keystore).isFile()) {
            throw new RuntimeException("No such keystore file: " + keystore);
        }
        if (storePass == null) {
            storePass = readSecret("Enter keystore password: ", commandInvocation);
            keyPass = readSecret("Enter key password: ", commandInvocation);
        }
        if (keyPass == null) {
            keyPass = storePass;
        }
        if (alias == null) {
            alias = clientId;
        }
        String realmInfoUrl = server + "/realms/" + realm;
        signedRequestToken = AuthUtil.getSignedRequestToken(keystore, storePass, keyPass, alias, sigLifetime, clientId, realmInfoUrl);
    }
    // if only server and realm are set, just save config and be done
    if (user == null && secret == null && keystore == null) {
        getHandler().saveMergeConfig(config -> {
            config.setServerUrl(server);
            config.setRealm(realm);
        });
        return CommandResult.SUCCESS;
    }
    setupTruststore(copyWithServerInfo(loadConfig()), commandInvocation);
    // now use the token endpoint to retrieve access token, and refresh token
    AccessTokenResponse tokens = signedRequestToken != null ? getAuthTokensByJWT(server, realm, user, password, clientId, signedRequestToken) : secret != null ? getAuthTokensBySecret(server, realm, user, password, clientId, secret) : getAuthTokens(server, realm, user, password, clientId);
    Long sigExpiresAt = signedRequestToken == null ? null : System.currentTimeMillis() + sigLifetime * 1000;
    // save tokens to config file
    saveTokens(tokens, server, realm, clientId, signedRequestToken, sigExpiresAt, secret, grantTypeForAuthentication);
    return CommandResult.SUCCESS;
}
Also used : File(java.io.File) AccessTokenResponse(org.keycloak.representations.AccessTokenResponse) URL(java.net.URL) CommandException(org.jboss.aesh.console.command.CommandException)

Aggregations

CommandException (org.jboss.aesh.console.command.CommandException)6 InputStream (java.io.InputStream)4 IOException (java.io.IOException)3 JsonNode (com.fasterxml.jackson.databind.JsonNode)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 File (java.io.File)2 PrintWriter (java.io.PrintWriter)2 StringWriter (java.io.StringWriter)2 URL (java.net.URL)2 LinkedList (java.util.LinkedList)2 List (java.util.List)2 Arguments (org.jboss.aesh.cl.Arguments)2 CommandDefinition (org.jboss.aesh.cl.CommandDefinition)2 Option (org.jboss.aesh.cl.Option)2 CommandResult (org.jboss.aesh.console.command.CommandResult)2 CommandInvocation (org.jboss.aesh.console.command.invocation.CommandInvocation)2 CmdStdinContext (org.keycloak.client.admin.cli.common.CmdStdinContext)2 AccessibleBufferOutputStream (org.keycloak.client.admin.cli.util.AccessibleBufferOutputStream)2 EndpointType (org.keycloak.client.registration.cli.common.EndpointType)2