go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/server/loginsessions/internal/statepb/state.proto (about) 1 // Copyright 2022 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 17 package luci.server.loginsessions; 18 19 import "google/protobuf/timestamp.proto"; 20 21 import "go.chromium.org/luci/auth/loginsessionspb/service.proto"; 22 23 option go_package = "go.chromium.org/luci/server/loginsessions/internal/statepb"; 24 25 26 // LoginSession is stored in the datastore. 27 // 28 // It is a superset of luci.auth.loginsessions.LoginSession from the public API 29 // that has additional internal fields. 30 message LoginSession { 31 // Unique ID of the session, matches luci.auth.loginsessions.LoginSession. 32 string id = 1; 33 // Password protecting access to GetLoginSession RPC. 34 bytes password = 2; 35 // The current session state. 36 luci.auth.loginsessions.LoginSession.State state = 3; 37 38 // When the session was created. Always populated. 39 google.protobuf.Timestamp created = 4; 40 // When the session will expire. Always populated. 41 google.protobuf.Timestamp expiry = 5; 42 // When the session moved to a final state. Populated for finished sessions. 43 google.protobuf.Timestamp completed = 6; 44 45 // Details provided in CreateLoginSessionRequest. Always populated. 46 string oauth_client_id = 7; 47 repeated string oauth_scopes = 8; 48 string oauth_s256_code_challenge = 9; 49 string executable_name = 10; 50 string client_hostname = 11; 51 52 // Active (non-expired) confirmation codes. 53 message ConfirmationCode { 54 string code = 1; 55 google.protobuf.Timestamp expiry = 2; 56 google.protobuf.Timestamp refresh = 3; 57 } 58 repeated ConfirmationCode confirmation_codes = 12; 59 60 // The outcome of the protocol. 61 string oauth_authorization_code = 13; 62 string oauth_redirect_url = 14; 63 string oauth_error = 15; 64 } 65 66 67 // OpenIDState is encrypted and used as `state` in OpenID Connect protocol. 68 message OpenIDState { 69 string login_session_id = 1; 70 string login_cookie_value = 2; 71 }