mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-23 22:38:06 +00:00
feat: add new api services (#5619)
* feat: add new services * improve demos and comments * remove unused field * add comment to demo proto calls * Apply suggestions from code review Co-authored-by: Silvan <silvan.reusser@gmail.com> --------- Co-authored-by: Silvan <silvan.reusser@gmail.com>
This commit is contained in:
12
proto/zitadel/session/v2alpha/session.proto
Normal file
12
proto/zitadel/session/v2alpha/session.proto
Normal file
@@ -0,0 +1,12 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package zitadel.session.v2alpha;
|
||||
|
||||
import "zitadel/user/v2alpha/user.proto";
|
||||
|
||||
option go_package = "github.com/zitadel/zitadel/pkg/grpc/session/v2alpha;session";
|
||||
|
||||
message Session {
|
||||
string id = 1;
|
||||
zitadel.user.v2alpha.User user = 2;
|
||||
}
|
33
proto/zitadel/session/v2alpha/session_service.proto
Normal file
33
proto/zitadel/session/v2alpha/session_service.proto
Normal file
@@ -0,0 +1,33 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package zitadel.session.v2alpha;
|
||||
|
||||
import "zitadel/options.proto";
|
||||
import "zitadel/session/v2alpha/session.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "validate/validate.proto";
|
||||
|
||||
option go_package = "github.com/zitadel/zitadel/pkg/grpc/session/v2alpha;session";
|
||||
|
||||
service SessionService {
|
||||
|
||||
// GetSession is to demonstrate an authenticated request, where the authenticated user (usage of another grpc package) is returned
|
||||
//
|
||||
// this request is subject to change and currently used for demonstration only
|
||||
rpc GetSession (GetSessionRequest) returns (GetSessionResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v2alpha/sessions/{id}"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "authenticated"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message GetSessionRequest{
|
||||
string id = 1;
|
||||
}
|
||||
message GetSessionResponse{
|
||||
Session session = 1;
|
||||
}
|
Reference in New Issue
Block a user