github.com/argoproj/argo-cd/v2@v2.10.9/server/session/session.proto (about)

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