|
|
@@ -1374,6 +1374,8 @@ func (m *AuthDisableRequest) String() string { return proto.CompactTextString(m)
|
|
|
func (*AuthDisableRequest) ProtoMessage() {}
|
|
|
|
|
|
type AuthenticateRequest struct {
|
|
|
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
+ Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
|
|
}
|
|
|
|
|
|
func (m *AuthenticateRequest) Reset() { *m = AuthenticateRequest{} }
|
|
|
@@ -1514,6 +1516,8 @@ func (m *AuthDisableResponse) GetHeader() *ResponseHeader {
|
|
|
|
|
|
type AuthenticateResponse struct {
|
|
|
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
|
|
|
+ // token is an authorized token that can be used in succeeding RPCs
|
|
|
+ Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
|
|
}
|
|
|
|
|
|
func (m *AuthenticateResponse) Reset() { *m = AuthenticateResponse{} }
|
|
|
@@ -4755,6 +4759,18 @@ func (m *AuthenticateRequest) MarshalTo(data []byte) (int, error) {
|
|
|
_ = i
|
|
|
var l int
|
|
|
_ = l
|
|
|
+ if len(m.Name) > 0 {
|
|
|
+ data[i] = 0xa
|
|
|
+ i++
|
|
|
+ i = encodeVarintRpc(data, i, uint64(len(m.Name)))
|
|
|
+ i += copy(data[i:], m.Name)
|
|
|
+ }
|
|
|
+ if len(m.Password) > 0 {
|
|
|
+ data[i] = 0x12
|
|
|
+ i++
|
|
|
+ i = encodeVarintRpc(data, i, uint64(len(m.Password)))
|
|
|
+ i += copy(data[i:], m.Password)
|
|
|
+ }
|
|
|
return i, nil
|
|
|
}
|
|
|
|
|
|
@@ -5101,6 +5117,12 @@ func (m *AuthenticateResponse) MarshalTo(data []byte) (int, error) {
|
|
|
}
|
|
|
i += n35
|
|
|
}
|
|
|
+ if len(m.Token) > 0 {
|
|
|
+ data[i] = 0x12
|
|
|
+ i++
|
|
|
+ i = encodeVarintRpc(data, i, uint64(len(m.Token)))
|
|
|
+ i += copy(data[i:], m.Token)
|
|
|
+ }
|
|
|
return i, nil
|
|
|
}
|
|
|
|
|
|
@@ -6187,6 +6209,14 @@ func (m *AuthDisableRequest) Size() (n int) {
|
|
|
func (m *AuthenticateRequest) Size() (n int) {
|
|
|
var l int
|
|
|
_ = l
|
|
|
+ l = len(m.Name)
|
|
|
+ if l > 0 {
|
|
|
+ n += 1 + l + sovRpc(uint64(l))
|
|
|
+ }
|
|
|
+ l = len(m.Password)
|
|
|
+ if l > 0 {
|
|
|
+ n += 1 + l + sovRpc(uint64(l))
|
|
|
+ }
|
|
|
return n
|
|
|
}
|
|
|
|
|
|
@@ -6323,6 +6353,10 @@ func (m *AuthenticateResponse) Size() (n int) {
|
|
|
l = m.Header.Size()
|
|
|
n += 1 + l + sovRpc(uint64(l))
|
|
|
}
|
|
|
+ l = len(m.Token)
|
|
|
+ if l > 0 {
|
|
|
+ n += 1 + l + sovRpc(uint64(l))
|
|
|
+ }
|
|
|
return n
|
|
|
}
|
|
|
|
|
|
@@ -11393,6 +11427,64 @@ func (m *AuthenticateRequest) Unmarshal(data []byte) error {
|
|
|
return fmt.Errorf("proto: AuthenticateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
}
|
|
|
switch fieldNum {
|
|
|
+ case 1:
|
|
|
+ if wireType != 2 {
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
|
+ }
|
|
|
+ var stringLen uint64
|
|
|
+ for shift := uint(0); ; shift += 7 {
|
|
|
+ if shift >= 64 {
|
|
|
+ return ErrIntOverflowRpc
|
|
|
+ }
|
|
|
+ if iNdEx >= l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ b := data[iNdEx]
|
|
|
+ iNdEx++
|
|
|
+ stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
+ if b < 0x80 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ intStringLen := int(stringLen)
|
|
|
+ if intStringLen < 0 {
|
|
|
+ return ErrInvalidLengthRpc
|
|
|
+ }
|
|
|
+ postIndex := iNdEx + intStringLen
|
|
|
+ if postIndex > l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ m.Name = string(data[iNdEx:postIndex])
|
|
|
+ iNdEx = postIndex
|
|
|
+ case 2:
|
|
|
+ if wireType != 2 {
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
|
|
|
+ }
|
|
|
+ var stringLen uint64
|
|
|
+ for shift := uint(0); ; shift += 7 {
|
|
|
+ if shift >= 64 {
|
|
|
+ return ErrIntOverflowRpc
|
|
|
+ }
|
|
|
+ if iNdEx >= l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ b := data[iNdEx]
|
|
|
+ iNdEx++
|
|
|
+ stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
+ if b < 0x80 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ intStringLen := int(stringLen)
|
|
|
+ if intStringLen < 0 {
|
|
|
+ return ErrInvalidLengthRpc
|
|
|
+ }
|
|
|
+ postIndex := iNdEx + intStringLen
|
|
|
+ if postIndex > l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ m.Password = string(data[iNdEx:postIndex])
|
|
|
+ iNdEx = postIndex
|
|
|
default:
|
|
|
iNdEx = preIndex
|
|
|
skippy, err := skipRpc(data[iNdEx:])
|
|
|
@@ -12486,6 +12578,35 @@ func (m *AuthenticateResponse) Unmarshal(data []byte) error {
|
|
|
return err
|
|
|
}
|
|
|
iNdEx = postIndex
|
|
|
+ case 2:
|
|
|
+ if wireType != 2 {
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
|
|
+ }
|
|
|
+ var stringLen uint64
|
|
|
+ for shift := uint(0); ; shift += 7 {
|
|
|
+ if shift >= 64 {
|
|
|
+ return ErrIntOverflowRpc
|
|
|
+ }
|
|
|
+ if iNdEx >= l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ b := data[iNdEx]
|
|
|
+ iNdEx++
|
|
|
+ stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
+ if b < 0x80 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ intStringLen := int(stringLen)
|
|
|
+ if intStringLen < 0 {
|
|
|
+ return ErrInvalidLengthRpc
|
|
|
+ }
|
|
|
+ postIndex := iNdEx + intStringLen
|
|
|
+ if postIndex > l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ m.Token = string(data[iNdEx:postIndex])
|
|
|
+ iNdEx = postIndex
|
|
|
default:
|
|
|
iNdEx = preIndex
|
|
|
skippy, err := skipRpc(data[iNdEx:])
|