github.com/argoproj/argo-cd@v1.8.7/server/session/session.proto (about) 1 syntax = "proto3"; 2 option go_package = "github.com/argoproj/argo-cd/pkg/apiclient/session"; 3 4 // Session Service 5 // 6 // Session Service API performs CRUD actions against session resources 7 package session; 8 9 import "gogoproto/gogo.proto"; 10 import "google/api/annotations.proto"; 11 import "k8s.io/api/core/v1/generated.proto"; 12 import "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto"; 13 14 15 // SessionCreateRequest is for logging in. 16 message SessionCreateRequest { 17 string username = 1; 18 string password = 2; 19 string token = 3; 20 } 21 22 // SessionDeleteRequest is for logging out. 23 message SessionDeleteRequest {} 24 25 // SessionResponse wraps the created token or returns an empty string if deleted. 26 message SessionResponse { 27 string token = 1; 28 } 29 30 // Get the current user's userInfo info 31 message GetUserInfoRequest { 32 } 33 34 // The current user's userInfo info 35 message GetUserInfoResponse { 36 bool loggedIn = 1; 37 string username = 2; 38 string iss = 3; 39 repeated string groups = 4; 40 } 41 42 // SessionService 43 service SessionService { 44 45 // Get the current user's info 46 rpc GetUserInfo (GetUserInfoRequest) returns (GetUserInfoResponse) { 47 option (google.api.http).get = "/api/v1/session/userinfo"; 48 } 49 50 // Create a new JWT for authentication and set a cookie if using HTTP 51 rpc Create(SessionCreateRequest) returns (SessionResponse) { 52 option (google.api.http) = { 53 post: "/api/v1/session" 54 body: "*" 55 }; 56 } 57 58 // Delete an existing JWT cookie if using HTTP 59 rpc Delete(SessionDeleteRequest) returns (SessionResponse) { 60 option (google.api.http) = { 61 delete: "/api/v1/session" 62 }; 63 } 64 }