Files
argo-cd/server/session/session.proto
github-actions[bot] 4d9835927d Bump major version to 3 (#21410)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: crenshaw-dev <350466+crenshaw-dev@users.noreply.github.com>
2025-01-10 16:14:00 -05:00

61 lines
1.4 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "github.com/argoproj/argo-cd/v3/pkg/apiclient/session";
// Session Service
//
// Session Service API performs CRUD actions against session resources
package session;
import "google/api/annotations.proto";
// SessionCreateRequest is for logging in.
message SessionCreateRequest {
string username = 1;
string password = 2;
string token = 3;
}
// SessionDeleteRequest is for logging out.
message SessionDeleteRequest {}
// SessionResponse wraps the created token or returns an empty string if deleted.
message SessionResponse {
string token = 1;
}
// Get the current user's userInfo info
message GetUserInfoRequest {
}
// The current user's userInfo info
message GetUserInfoResponse {
bool loggedIn = 1;
string username = 2;
string iss = 3;
repeated string groups = 4;
}
// SessionService
service SessionService {
// Get the current user's info
rpc GetUserInfo (GetUserInfoRequest) returns (GetUserInfoResponse) {
option (google.api.http).get = "/api/v1/session/userinfo";
}
// Create a new JWT for authentication and set a cookie if using HTTP
rpc Create(SessionCreateRequest) returns (SessionResponse) {
option (google.api.http) = {
post: "/api/v1/session"
body: "*"
};
}
// Delete an existing JWT cookie if using HTTP
rpc Delete(SessionDeleteRequest) returns (SessionResponse) {
option (google.api.http) = {
delete: "/api/v1/session"
};
}
}