Skip to content

Commit

Permalink
Protocol buffer definition for local login
Browse files Browse the repository at this point in the history
BUG=None
TEST=None

Review URL: http://codereview.chromium.org/5970008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70035 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
hclam@chromium.org committed Dec 23, 2010
1 parent f340282 commit 1f58afe
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
42 changes: 42 additions & 0 deletions remoting/proto/auth.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,45 @@ message ClientAuthToken {
// A short-lived OAuth token identifying the client to the host.
optional string client_oauth_token = 3;
}

// There can be more challenge types later
enum CredentialType {
PASSWORD = 0;
}

message LocalLoginCredentials {
optional CredentialType type = 1;
optional string username = 2;
optional bytes credential = 3;
}

message LocalLoginStatus {
optional bool success = 1;

// Only populated if success is set to false.
optional int32 tries_remaining = 2 [default = 0];
optional string error_info = 3;
}

// Sent from the Host to the Client. This is the first message after
// channels are established.
message LocalLoginProperties {
repeated CredentialType supported_credential_types = 1;

// Used to generate the bank style anti-phishing image.
// This info is stored only on the host.
optional bytes antiphish_image = 2;
optional bytes antiphish_text = 3;
}

// Sent from Client to Host. This consists of both the login attempt,
// and any session configuration information.
message BeginSessionRequest {
optional LocalLoginCredentials credentials = 1;
}

// Sent from Host to Client. Replies with login success, and
// final client configuration.
message BeginSessionResponse {
optional LocalLoginStatus login_status = 1;
}
4 changes: 2 additions & 2 deletions remoting/proto/control.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ package remoting.protocol;
message SuggestResolutionRequest {
required int32 width = 1;
required int32 height = 2;
};
}

message NotifyResolutionRequest {
required int32 width = 1;
required int32 height = 2;
};
}
3 changes: 3 additions & 0 deletions remoting/proto/internal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

syntax = "proto2";

import "auth.proto";
import "control.proto";
import "event.proto";

Expand All @@ -18,4 +19,6 @@ package remoting.protocol;
message ControlMessage {
optional SuggestResolutionRequest suggest_resolution = 1;
optional NotifyResolutionRequest notify_resolution = 2;
optional BeginSessionRequest begin_session_request = 3;
optional BeginSessionResponse begin_session_response = 4;
}

0 comments on commit 1f58afe

Please sign in to comment.