Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Correctly console session token on all logouts. (#875)
  • Loading branch information
ftkg committed Jul 2, 2022
1 parent 6f7cbeb commit ce8d392
Show file tree
Hide file tree
Showing 16 changed files with 1,528 additions and 1,207 deletions.
2,419 changes: 1,247 additions & 1,172 deletions console/console.pb.go

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions console/console.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions console/console.proto
Expand Up @@ -86,6 +86,14 @@ service Console {
};
}

// Log out a session and invalidate the session token.
rpc AuthenticateLogout (AuthenticateLogoutRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v2/console/authenticate/logout",
body: "*"
};
}

// Add a new console user.
rpc AddUser (AddUserRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
Expand Down Expand Up @@ -504,6 +512,12 @@ message AuthenticateRequest {
string password = 2;
}

// Log out a session and invalidate a session token.
message AuthenticateLogoutRequest {
// Session token to log out.
string token = 1;
}

// API Explorer request definition for CallApiEndpoint
message CallApiEndpointRequest {
string method = 1;
Expand Down
43 changes: 43 additions & 0 deletions console/console.swagger.json
Expand Up @@ -1060,6 +1060,39 @@
]
}
},
"/v2/console/authenticate/logout": {
"post": {
"summary": "Log out a session and invalidate the session token.",
"operationId": "Console_AuthenticateLogout",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"properties": {}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/consoleAuthenticateLogoutRequest"
}
}
],
"tags": [
"Console"
]
}
},
"/v2/console/config": {
"get": {
"summary": "Get server config and configuration warnings.",
Expand Down Expand Up @@ -2998,6 +3031,16 @@
},
"title": "API Explorer List of Endpoints"
},
"consoleAuthenticateLogoutRequest": {
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Session token to log out."
}
},
"description": "Log out a session and invalidate a session token."
},
"consoleAuthenticateRequest": {
"type": "object",
"properties": {
Expand Down
38 changes: 38 additions & 0 deletions console/console_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce8d392

Please sign in to comment.