flat-battery-95469
03/31/2024, 7:23 AMmagnificent-energy-493
keto serve
command starts the server and serves both the HTTP REST and gRPC APIs. This command opens the network ports and listens to HTTP and gRPC API requests [source].
To connect to Ory Keto via gRPC, you would need a gRPC client in your preferred programming language. The Ory Keto SDKs, which are generated using the openapi-generator, can be used for this purpose. The SDKs are available for several popular languages including Go, Java, JavaScript, Python, and more [source].
For Go, you can install the gRPC API with the following command:
go get <http://github.com/ory/keto/proto|github.com/ory/keto/proto>
And for REST API:
go get <http://github.com/ory/keto-client-go|github.com/ory/keto-client-go>
[source]
I am not sure if there is a good tutorial for grpc 😬
You can find some community guides here: https://github.com/ory/examplesflat-battery-95469
04/05/2024, 6:43 AMflat-battery-95469
04/05/2024, 6:44 AMflat-battery-95469
04/05/2024, 6:45 AMflat-battery-95469
04/05/2024, 6:45 AMflat-battery-95469
04/05/2024, 6:53 AMexport const createPermissionApi = (basePath: string, apiKey: string) => {
const permissionApi = new PermissionApi(
new Configuration({
accessToken: apiKey,
basePath,
}),
);
return permissionApi;
};
flat-battery-95469
04/05/2024, 6:54 AMimport { default as keto } from "@ory/keto-grpc-client";
import { ChannelCredentials } from "@grpc/grpc-js";
export const checkClient = new keto.checkService.CheckServiceClient(
"???",
ChannelCredentials.createInsecure(),
);
flat-battery-95469
04/05/2024, 6:55 AMlocalhost:4466
how is keto serve
connected to my ory network project? I cannot find any config for that