protobuf/api/user_service.proto (76 lines of code) (raw):
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2006 Google Inc.
// All Rights Reserved.
//
// Stubby service definition to retrieve information about users.
syntax = "proto2";
package java.apphosting;
option java_package = "com.google.apphosting.api";
option java_outer_classname = "UserServicePb";
message UserServiceError {
enum ErrorCode {
OK = 0;
REDIRECT_URL_TOO_LONG = 1;
NOT_ALLOWED = 2;
OAUTH_INVALID_TOKEN = 3;
OAUTH_INVALID_REQUEST = 4;
OAUTH_ERROR = 5;
}
}
message CreateLoginURLRequest {
required string destination_url = 1;
optional string auth_domain = 2;
// federated_identity is used to do OpenID login. string type default is "".
optional string federated_identity = 3;
}
message CreateLoginURLResponse {
optional string login_url = 1; // Required, but not proto enforced.
}
message CreateLogoutURLRequest {
required string destination_url = 1;
optional string auth_domain = 2;
}
message CreateLogoutURLResponse {
optional string logout_url = 1; // Required, but not proto enforced.
}
message GetOAuthUserRequest {
// The scope of the OAuth token to check for, e.g.
// "https://www.googleapis.com/auth/appengine.admin".
// Used if present and "scopes" is unset.
// If both "scope" and "scopes" are not specified, defaults to checking for
// app-specific token as described in
// http://g3doc/apphosting/g3doc/wiki-carryover/oauth_integration.md
optional string scope = 1;
// List of scopes, one of them must be present in authentication credentials
// for the request to succeed.
// If present, "scope" is ignored.
repeated string scopes = 2;
// Deprecated. Does nothing.
optional bool request_writer_permission = 3 [deprecated = true];
}
message GetOAuthUserResponse {
optional string email = 1; // Required, but not proto enforced.
optional string user_id = 2; // Required, but not proto enforced.
optional string auth_domain = 3; // Required, but not proto enforced.
optional string user_organization = 4;
optional bool is_admin = 5;
optional string client_id = 6;
// Authorized scopes from GetOAuthUserRequest.
repeated string scopes = 7;
// Deprecated. Never set.
optional bool is_project_writer = 8 [deprecated = true];
}