github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/pingcap/go-hbase/protobuf/Authentication.proto (about)

     1  package proto;
     2  /**
     3   * Licensed to the Apache Software Foundation (ASF) under one
     4   * or more contributor license agreements.  See the NOTICE file
     5   * distributed with this work for additional information
     6   * regarding copyright ownership.  The ASF licenses this file
     7   * to you under the Apache License, Version 2.0 (the
     8   * "License"); you may not use this file except in compliance
     9   * with the License.  You may obtain a copy of the License at
    10   *
    11   *     http://www.apache.org/licenses/LICENSE-2.0
    12   *
    13   * Unless required by applicable law or agreed to in writing, software
    14   * distributed under the License is distributed on an "AS IS" BASIS,
    15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16   * See the License for the specific language governing permissions and
    17   * limitations under the License.
    18   */
    19  
    20  option java_package = "org.apache.hadoop.hbase.protobuf.generated";
    21  option java_outer_classname = "AuthenticationProtos";
    22  option java_generic_services = true;
    23  option java_generate_equals_and_hash = true;
    24  option optimize_for = SPEED;
    25  
    26  message AuthenticationKey {
    27      required int32 id = 1;
    28      required int64 expiration_date = 2;
    29      required bytes key = 3;
    30  }
    31  
    32  
    33  message TokenIdentifier {
    34      enum Kind {
    35          HBASE_AUTH_TOKEN = 0;
    36      }
    37      required Kind kind = 1;
    38      required bytes username = 2;
    39      required int32 key_id = 3;
    40      optional int64 issue_date = 4;
    41      optional int64 expiration_date = 5;
    42      optional int64 sequence_number = 6;
    43  }
    44  
    45  
    46  // Serialization of the org.apache.hadoop.security.token.Token class
    47  // Note that this is a Hadoop class, so fields may change!
    48  message Token {
    49      // the TokenIdentifier in serialized form
    50      // Note: we can't use the protobuf directly because the Hadoop Token class
    51      // only stores the serialized bytes
    52      optional bytes identifier = 1;
    53      optional bytes password = 2;
    54      optional bytes service = 3;
    55  }
    56  
    57  
    58  // RPC request & response messages
    59  message GetAuthenticationTokenRequest {
    60  }
    61  
    62  message GetAuthenticationTokenResponse {
    63      optional Token token = 1;
    64  }
    65  
    66  message WhoAmIRequest {
    67  }
    68  
    69  message WhoAmIResponse {
    70      optional string username = 1;
    71      optional string auth_method = 2;
    72  }
    73  
    74  
    75  // RPC service
    76  service AuthenticationService {
    77      rpc GetAuthenticationToken(GetAuthenticationTokenRequest)
    78          returns (GetAuthenticationTokenResponse);
    79  
    80      rpc WhoAmI(WhoAmIRequest)
    81          returns (WhoAmIResponse);
    82  }