github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/server/serverpb/authentication.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: server/serverpb/authentication.proto
     3  
     4  package serverpb
     5  
     6  import proto "github.com/gogo/protobuf/proto"
     7  import fmt "fmt"
     8  import math "math"
     9  
    10  import (
    11  	context "context"
    12  	grpc "google.golang.org/grpc"
    13  )
    14  
    15  import io "io"
    16  
    17  // Reference imports to suppress errors if they are not otherwise used.
    18  var _ = proto.Marshal
    19  var _ = fmt.Errorf
    20  var _ = math.Inf
    21  
    22  // This is a compile-time assertion to ensure that this generated file
    23  // is compatible with the proto package it is being compiled against.
    24  // A compilation error at this line likely means your copy of the
    25  // proto package needs to be updated.
    26  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    27  
    28  // UserLoginRequest contains credentials a user must provide to log in.
    29  type UserLoginRequest struct {
    30  	// A username which must correspond to a database user on the cluster.
    31  	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
    32  	// A password for the provided username.
    33  	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
    34  }
    35  
    36  func (m *UserLoginRequest) Reset()         { *m = UserLoginRequest{} }
    37  func (m *UserLoginRequest) String() string { return proto.CompactTextString(m) }
    38  func (*UserLoginRequest) ProtoMessage()    {}
    39  func (*UserLoginRequest) Descriptor() ([]byte, []int) {
    40  	return fileDescriptor_authentication_38fb587d3f7ced6d, []int{0}
    41  }
    42  func (m *UserLoginRequest) XXX_Unmarshal(b []byte) error {
    43  	return m.Unmarshal(b)
    44  }
    45  func (m *UserLoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    46  	b = b[:cap(b)]
    47  	n, err := m.MarshalTo(b)
    48  	if err != nil {
    49  		return nil, err
    50  	}
    51  	return b[:n], nil
    52  }
    53  func (dst *UserLoginRequest) XXX_Merge(src proto.Message) {
    54  	xxx_messageInfo_UserLoginRequest.Merge(dst, src)
    55  }
    56  func (m *UserLoginRequest) XXX_Size() int {
    57  	return m.Size()
    58  }
    59  func (m *UserLoginRequest) XXX_DiscardUnknown() {
    60  	xxx_messageInfo_UserLoginRequest.DiscardUnknown(m)
    61  }
    62  
    63  var xxx_messageInfo_UserLoginRequest proto.InternalMessageInfo
    64  
    65  // UserLoginResponse is currently empty. If a login is successful, an HTTP
    66  // Set-Cookie header will be added to the response with a session
    67  // cookie identifying the created session.
    68  type UserLoginResponse struct {
    69  }
    70  
    71  func (m *UserLoginResponse) Reset()         { *m = UserLoginResponse{} }
    72  func (m *UserLoginResponse) String() string { return proto.CompactTextString(m) }
    73  func (*UserLoginResponse) ProtoMessage()    {}
    74  func (*UserLoginResponse) Descriptor() ([]byte, []int) {
    75  	return fileDescriptor_authentication_38fb587d3f7ced6d, []int{1}
    76  }
    77  func (m *UserLoginResponse) XXX_Unmarshal(b []byte) error {
    78  	return m.Unmarshal(b)
    79  }
    80  func (m *UserLoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    81  	b = b[:cap(b)]
    82  	n, err := m.MarshalTo(b)
    83  	if err != nil {
    84  		return nil, err
    85  	}
    86  	return b[:n], nil
    87  }
    88  func (dst *UserLoginResponse) XXX_Merge(src proto.Message) {
    89  	xxx_messageInfo_UserLoginResponse.Merge(dst, src)
    90  }
    91  func (m *UserLoginResponse) XXX_Size() int {
    92  	return m.Size()
    93  }
    94  func (m *UserLoginResponse) XXX_DiscardUnknown() {
    95  	xxx_messageInfo_UserLoginResponse.DiscardUnknown(m)
    96  }
    97  
    98  var xxx_messageInfo_UserLoginResponse proto.InternalMessageInfo
    99  
   100  // UserLogoutRequest will terminate the current session in use. The request
   101  // is empty because the current session is identified by an HTTP cookie on the
   102  // incoming request.
   103  type UserLogoutRequest struct {
   104  }
   105  
   106  func (m *UserLogoutRequest) Reset()         { *m = UserLogoutRequest{} }
   107  func (m *UserLogoutRequest) String() string { return proto.CompactTextString(m) }
   108  func (*UserLogoutRequest) ProtoMessage()    {}
   109  func (*UserLogoutRequest) Descriptor() ([]byte, []int) {
   110  	return fileDescriptor_authentication_38fb587d3f7ced6d, []int{2}
   111  }
   112  func (m *UserLogoutRequest) XXX_Unmarshal(b []byte) error {
   113  	return m.Unmarshal(b)
   114  }
   115  func (m *UserLogoutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   116  	b = b[:cap(b)]
   117  	n, err := m.MarshalTo(b)
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	return b[:n], nil
   122  }
   123  func (dst *UserLogoutRequest) XXX_Merge(src proto.Message) {
   124  	xxx_messageInfo_UserLogoutRequest.Merge(dst, src)
   125  }
   126  func (m *UserLogoutRequest) XXX_Size() int {
   127  	return m.Size()
   128  }
   129  func (m *UserLogoutRequest) XXX_DiscardUnknown() {
   130  	xxx_messageInfo_UserLogoutRequest.DiscardUnknown(m)
   131  }
   132  
   133  var xxx_messageInfo_UserLogoutRequest proto.InternalMessageInfo
   134  
   135  type UserLogoutResponse struct {
   136  }
   137  
   138  func (m *UserLogoutResponse) Reset()         { *m = UserLogoutResponse{} }
   139  func (m *UserLogoutResponse) String() string { return proto.CompactTextString(m) }
   140  func (*UserLogoutResponse) ProtoMessage()    {}
   141  func (*UserLogoutResponse) Descriptor() ([]byte, []int) {
   142  	return fileDescriptor_authentication_38fb587d3f7ced6d, []int{3}
   143  }
   144  func (m *UserLogoutResponse) XXX_Unmarshal(b []byte) error {
   145  	return m.Unmarshal(b)
   146  }
   147  func (m *UserLogoutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   148  	b = b[:cap(b)]
   149  	n, err := m.MarshalTo(b)
   150  	if err != nil {
   151  		return nil, err
   152  	}
   153  	return b[:n], nil
   154  }
   155  func (dst *UserLogoutResponse) XXX_Merge(src proto.Message) {
   156  	xxx_messageInfo_UserLogoutResponse.Merge(dst, src)
   157  }
   158  func (m *UserLogoutResponse) XXX_Size() int {
   159  	return m.Size()
   160  }
   161  func (m *UserLogoutResponse) XXX_DiscardUnknown() {
   162  	xxx_messageInfo_UserLogoutResponse.DiscardUnknown(m)
   163  }
   164  
   165  var xxx_messageInfo_UserLogoutResponse proto.InternalMessageInfo
   166  
   167  // SessionCookie is a message used to encode the authentication cookie returned
   168  // from successful login requests.
   169  type SessionCookie struct {
   170  	// The unique ID of the session.
   171  	ID int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
   172  	// The secret needed to verify ownership of a session.
   173  	Secret []byte `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
   174  }
   175  
   176  func (m *SessionCookie) Reset()         { *m = SessionCookie{} }
   177  func (m *SessionCookie) String() string { return proto.CompactTextString(m) }
   178  func (*SessionCookie) ProtoMessage()    {}
   179  func (*SessionCookie) Descriptor() ([]byte, []int) {
   180  	return fileDescriptor_authentication_38fb587d3f7ced6d, []int{4}
   181  }
   182  func (m *SessionCookie) XXX_Unmarshal(b []byte) error {
   183  	return m.Unmarshal(b)
   184  }
   185  func (m *SessionCookie) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   186  	b = b[:cap(b)]
   187  	n, err := m.MarshalTo(b)
   188  	if err != nil {
   189  		return nil, err
   190  	}
   191  	return b[:n], nil
   192  }
   193  func (dst *SessionCookie) XXX_Merge(src proto.Message) {
   194  	xxx_messageInfo_SessionCookie.Merge(dst, src)
   195  }
   196  func (m *SessionCookie) XXX_Size() int {
   197  	return m.Size()
   198  }
   199  func (m *SessionCookie) XXX_DiscardUnknown() {
   200  	xxx_messageInfo_SessionCookie.DiscardUnknown(m)
   201  }
   202  
   203  var xxx_messageInfo_SessionCookie proto.InternalMessageInfo
   204  
   205  func init() {
   206  	proto.RegisterType((*UserLoginRequest)(nil), "cockroach.server.serverpb.UserLoginRequest")
   207  	proto.RegisterType((*UserLoginResponse)(nil), "cockroach.server.serverpb.UserLoginResponse")
   208  	proto.RegisterType((*UserLogoutRequest)(nil), "cockroach.server.serverpb.UserLogoutRequest")
   209  	proto.RegisterType((*UserLogoutResponse)(nil), "cockroach.server.serverpb.UserLogoutResponse")
   210  	proto.RegisterType((*SessionCookie)(nil), "cockroach.server.serverpb.SessionCookie")
   211  }
   212  
   213  // Reference imports to suppress errors if they are not otherwise used.
   214  var _ context.Context
   215  var _ grpc.ClientConn
   216  
   217  // This is a compile-time assertion to ensure that this generated file
   218  // is compatible with the grpc package it is being compiled against.
   219  const _ = grpc.SupportPackageIsVersion4
   220  
   221  // LogInClient is the client API for LogIn service.
   222  //
   223  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   224  type LogInClient interface {
   225  	// UserLogin is used to create a web authentication session.
   226  	UserLogin(ctx context.Context, in *UserLoginRequest, opts ...grpc.CallOption) (*UserLoginResponse, error)
   227  }
   228  
   229  type logInClient struct {
   230  	cc *grpc.ClientConn
   231  }
   232  
   233  func NewLogInClient(cc *grpc.ClientConn) LogInClient {
   234  	return &logInClient{cc}
   235  }
   236  
   237  func (c *logInClient) UserLogin(ctx context.Context, in *UserLoginRequest, opts ...grpc.CallOption) (*UserLoginResponse, error) {
   238  	out := new(UserLoginResponse)
   239  	err := c.cc.Invoke(ctx, "/cockroach.server.serverpb.LogIn/UserLogin", in, out, opts...)
   240  	if err != nil {
   241  		return nil, err
   242  	}
   243  	return out, nil
   244  }
   245  
   246  // LogInServer is the server API for LogIn service.
   247  type LogInServer interface {
   248  	// UserLogin is used to create a web authentication session.
   249  	UserLogin(context.Context, *UserLoginRequest) (*UserLoginResponse, error)
   250  }
   251  
   252  func RegisterLogInServer(s *grpc.Server, srv LogInServer) {
   253  	s.RegisterService(&_LogIn_serviceDesc, srv)
   254  }
   255  
   256  func _LogIn_UserLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   257  	in := new(UserLoginRequest)
   258  	if err := dec(in); err != nil {
   259  		return nil, err
   260  	}
   261  	if interceptor == nil {
   262  		return srv.(LogInServer).UserLogin(ctx, in)
   263  	}
   264  	info := &grpc.UnaryServerInfo{
   265  		Server:     srv,
   266  		FullMethod: "/cockroach.server.serverpb.LogIn/UserLogin",
   267  	}
   268  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   269  		return srv.(LogInServer).UserLogin(ctx, req.(*UserLoginRequest))
   270  	}
   271  	return interceptor(ctx, in, info, handler)
   272  }
   273  
   274  var _LogIn_serviceDesc = grpc.ServiceDesc{
   275  	ServiceName: "cockroach.server.serverpb.LogIn",
   276  	HandlerType: (*LogInServer)(nil),
   277  	Methods: []grpc.MethodDesc{
   278  		{
   279  			MethodName: "UserLogin",
   280  			Handler:    _LogIn_UserLogin_Handler,
   281  		},
   282  	},
   283  	Streams:  []grpc.StreamDesc{},
   284  	Metadata: "server/serverpb/authentication.proto",
   285  }
   286  
   287  // LogOutClient is the client API for LogOut service.
   288  //
   289  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   290  type LogOutClient interface {
   291  	// UserLogout terminates an active authentication session.
   292  	UserLogout(ctx context.Context, in *UserLogoutRequest, opts ...grpc.CallOption) (*UserLogoutResponse, error)
   293  }
   294  
   295  type logOutClient struct {
   296  	cc *grpc.ClientConn
   297  }
   298  
   299  func NewLogOutClient(cc *grpc.ClientConn) LogOutClient {
   300  	return &logOutClient{cc}
   301  }
   302  
   303  func (c *logOutClient) UserLogout(ctx context.Context, in *UserLogoutRequest, opts ...grpc.CallOption) (*UserLogoutResponse, error) {
   304  	out := new(UserLogoutResponse)
   305  	err := c.cc.Invoke(ctx, "/cockroach.server.serverpb.LogOut/UserLogout", in, out, opts...)
   306  	if err != nil {
   307  		return nil, err
   308  	}
   309  	return out, nil
   310  }
   311  
   312  // LogOutServer is the server API for LogOut service.
   313  type LogOutServer interface {
   314  	// UserLogout terminates an active authentication session.
   315  	UserLogout(context.Context, *UserLogoutRequest) (*UserLogoutResponse, error)
   316  }
   317  
   318  func RegisterLogOutServer(s *grpc.Server, srv LogOutServer) {
   319  	s.RegisterService(&_LogOut_serviceDesc, srv)
   320  }
   321  
   322  func _LogOut_UserLogout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   323  	in := new(UserLogoutRequest)
   324  	if err := dec(in); err != nil {
   325  		return nil, err
   326  	}
   327  	if interceptor == nil {
   328  		return srv.(LogOutServer).UserLogout(ctx, in)
   329  	}
   330  	info := &grpc.UnaryServerInfo{
   331  		Server:     srv,
   332  		FullMethod: "/cockroach.server.serverpb.LogOut/UserLogout",
   333  	}
   334  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   335  		return srv.(LogOutServer).UserLogout(ctx, req.(*UserLogoutRequest))
   336  	}
   337  	return interceptor(ctx, in, info, handler)
   338  }
   339  
   340  var _LogOut_serviceDesc = grpc.ServiceDesc{
   341  	ServiceName: "cockroach.server.serverpb.LogOut",
   342  	HandlerType: (*LogOutServer)(nil),
   343  	Methods: []grpc.MethodDesc{
   344  		{
   345  			MethodName: "UserLogout",
   346  			Handler:    _LogOut_UserLogout_Handler,
   347  		},
   348  	},
   349  	Streams:  []grpc.StreamDesc{},
   350  	Metadata: "server/serverpb/authentication.proto",
   351  }
   352  
   353  func (m *UserLoginRequest) Marshal() (dAtA []byte, err error) {
   354  	size := m.Size()
   355  	dAtA = make([]byte, size)
   356  	n, err := m.MarshalTo(dAtA)
   357  	if err != nil {
   358  		return nil, err
   359  	}
   360  	return dAtA[:n], nil
   361  }
   362  
   363  func (m *UserLoginRequest) MarshalTo(dAtA []byte) (int, error) {
   364  	var i int
   365  	_ = i
   366  	var l int
   367  	_ = l
   368  	if len(m.Username) > 0 {
   369  		dAtA[i] = 0xa
   370  		i++
   371  		i = encodeVarintAuthentication(dAtA, i, uint64(len(m.Username)))
   372  		i += copy(dAtA[i:], m.Username)
   373  	}
   374  	if len(m.Password) > 0 {
   375  		dAtA[i] = 0x12
   376  		i++
   377  		i = encodeVarintAuthentication(dAtA, i, uint64(len(m.Password)))
   378  		i += copy(dAtA[i:], m.Password)
   379  	}
   380  	return i, nil
   381  }
   382  
   383  func (m *UserLoginResponse) Marshal() (dAtA []byte, err error) {
   384  	size := m.Size()
   385  	dAtA = make([]byte, size)
   386  	n, err := m.MarshalTo(dAtA)
   387  	if err != nil {
   388  		return nil, err
   389  	}
   390  	return dAtA[:n], nil
   391  }
   392  
   393  func (m *UserLoginResponse) MarshalTo(dAtA []byte) (int, error) {
   394  	var i int
   395  	_ = i
   396  	var l int
   397  	_ = l
   398  	return i, nil
   399  }
   400  
   401  func (m *UserLogoutRequest) Marshal() (dAtA []byte, err error) {
   402  	size := m.Size()
   403  	dAtA = make([]byte, size)
   404  	n, err := m.MarshalTo(dAtA)
   405  	if err != nil {
   406  		return nil, err
   407  	}
   408  	return dAtA[:n], nil
   409  }
   410  
   411  func (m *UserLogoutRequest) MarshalTo(dAtA []byte) (int, error) {
   412  	var i int
   413  	_ = i
   414  	var l int
   415  	_ = l
   416  	return i, nil
   417  }
   418  
   419  func (m *UserLogoutResponse) Marshal() (dAtA []byte, err error) {
   420  	size := m.Size()
   421  	dAtA = make([]byte, size)
   422  	n, err := m.MarshalTo(dAtA)
   423  	if err != nil {
   424  		return nil, err
   425  	}
   426  	return dAtA[:n], nil
   427  }
   428  
   429  func (m *UserLogoutResponse) MarshalTo(dAtA []byte) (int, error) {
   430  	var i int
   431  	_ = i
   432  	var l int
   433  	_ = l
   434  	return i, nil
   435  }
   436  
   437  func (m *SessionCookie) Marshal() (dAtA []byte, err error) {
   438  	size := m.Size()
   439  	dAtA = make([]byte, size)
   440  	n, err := m.MarshalTo(dAtA)
   441  	if err != nil {
   442  		return nil, err
   443  	}
   444  	return dAtA[:n], nil
   445  }
   446  
   447  func (m *SessionCookie) MarshalTo(dAtA []byte) (int, error) {
   448  	var i int
   449  	_ = i
   450  	var l int
   451  	_ = l
   452  	if m.ID != 0 {
   453  		dAtA[i] = 0x8
   454  		i++
   455  		i = encodeVarintAuthentication(dAtA, i, uint64(m.ID))
   456  	}
   457  	if len(m.Secret) > 0 {
   458  		dAtA[i] = 0x12
   459  		i++
   460  		i = encodeVarintAuthentication(dAtA, i, uint64(len(m.Secret)))
   461  		i += copy(dAtA[i:], m.Secret)
   462  	}
   463  	return i, nil
   464  }
   465  
   466  func encodeVarintAuthentication(dAtA []byte, offset int, v uint64) int {
   467  	for v >= 1<<7 {
   468  		dAtA[offset] = uint8(v&0x7f | 0x80)
   469  		v >>= 7
   470  		offset++
   471  	}
   472  	dAtA[offset] = uint8(v)
   473  	return offset + 1
   474  }
   475  func (m *UserLoginRequest) Size() (n int) {
   476  	if m == nil {
   477  		return 0
   478  	}
   479  	var l int
   480  	_ = l
   481  	l = len(m.Username)
   482  	if l > 0 {
   483  		n += 1 + l + sovAuthentication(uint64(l))
   484  	}
   485  	l = len(m.Password)
   486  	if l > 0 {
   487  		n += 1 + l + sovAuthentication(uint64(l))
   488  	}
   489  	return n
   490  }
   491  
   492  func (m *UserLoginResponse) Size() (n int) {
   493  	if m == nil {
   494  		return 0
   495  	}
   496  	var l int
   497  	_ = l
   498  	return n
   499  }
   500  
   501  func (m *UserLogoutRequest) Size() (n int) {
   502  	if m == nil {
   503  		return 0
   504  	}
   505  	var l int
   506  	_ = l
   507  	return n
   508  }
   509  
   510  func (m *UserLogoutResponse) Size() (n int) {
   511  	if m == nil {
   512  		return 0
   513  	}
   514  	var l int
   515  	_ = l
   516  	return n
   517  }
   518  
   519  func (m *SessionCookie) Size() (n int) {
   520  	if m == nil {
   521  		return 0
   522  	}
   523  	var l int
   524  	_ = l
   525  	if m.ID != 0 {
   526  		n += 1 + sovAuthentication(uint64(m.ID))
   527  	}
   528  	l = len(m.Secret)
   529  	if l > 0 {
   530  		n += 1 + l + sovAuthentication(uint64(l))
   531  	}
   532  	return n
   533  }
   534  
   535  func sovAuthentication(x uint64) (n int) {
   536  	for {
   537  		n++
   538  		x >>= 7
   539  		if x == 0 {
   540  			break
   541  		}
   542  	}
   543  	return n
   544  }
   545  func sozAuthentication(x uint64) (n int) {
   546  	return sovAuthentication(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   547  }
   548  func (m *UserLoginRequest) Unmarshal(dAtA []byte) error {
   549  	l := len(dAtA)
   550  	iNdEx := 0
   551  	for iNdEx < l {
   552  		preIndex := iNdEx
   553  		var wire uint64
   554  		for shift := uint(0); ; shift += 7 {
   555  			if shift >= 64 {
   556  				return ErrIntOverflowAuthentication
   557  			}
   558  			if iNdEx >= l {
   559  				return io.ErrUnexpectedEOF
   560  			}
   561  			b := dAtA[iNdEx]
   562  			iNdEx++
   563  			wire |= (uint64(b) & 0x7F) << shift
   564  			if b < 0x80 {
   565  				break
   566  			}
   567  		}
   568  		fieldNum := int32(wire >> 3)
   569  		wireType := int(wire & 0x7)
   570  		if wireType == 4 {
   571  			return fmt.Errorf("proto: UserLoginRequest: wiretype end group for non-group")
   572  		}
   573  		if fieldNum <= 0 {
   574  			return fmt.Errorf("proto: UserLoginRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   575  		}
   576  		switch fieldNum {
   577  		case 1:
   578  			if wireType != 2 {
   579  				return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
   580  			}
   581  			var stringLen uint64
   582  			for shift := uint(0); ; shift += 7 {
   583  				if shift >= 64 {
   584  					return ErrIntOverflowAuthentication
   585  				}
   586  				if iNdEx >= l {
   587  					return io.ErrUnexpectedEOF
   588  				}
   589  				b := dAtA[iNdEx]
   590  				iNdEx++
   591  				stringLen |= (uint64(b) & 0x7F) << shift
   592  				if b < 0x80 {
   593  					break
   594  				}
   595  			}
   596  			intStringLen := int(stringLen)
   597  			if intStringLen < 0 {
   598  				return ErrInvalidLengthAuthentication
   599  			}
   600  			postIndex := iNdEx + intStringLen
   601  			if postIndex > l {
   602  				return io.ErrUnexpectedEOF
   603  			}
   604  			m.Username = string(dAtA[iNdEx:postIndex])
   605  			iNdEx = postIndex
   606  		case 2:
   607  			if wireType != 2 {
   608  				return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
   609  			}
   610  			var stringLen uint64
   611  			for shift := uint(0); ; shift += 7 {
   612  				if shift >= 64 {
   613  					return ErrIntOverflowAuthentication
   614  				}
   615  				if iNdEx >= l {
   616  					return io.ErrUnexpectedEOF
   617  				}
   618  				b := dAtA[iNdEx]
   619  				iNdEx++
   620  				stringLen |= (uint64(b) & 0x7F) << shift
   621  				if b < 0x80 {
   622  					break
   623  				}
   624  			}
   625  			intStringLen := int(stringLen)
   626  			if intStringLen < 0 {
   627  				return ErrInvalidLengthAuthentication
   628  			}
   629  			postIndex := iNdEx + intStringLen
   630  			if postIndex > l {
   631  				return io.ErrUnexpectedEOF
   632  			}
   633  			m.Password = string(dAtA[iNdEx:postIndex])
   634  			iNdEx = postIndex
   635  		default:
   636  			iNdEx = preIndex
   637  			skippy, err := skipAuthentication(dAtA[iNdEx:])
   638  			if err != nil {
   639  				return err
   640  			}
   641  			if skippy < 0 {
   642  				return ErrInvalidLengthAuthentication
   643  			}
   644  			if (iNdEx + skippy) > l {
   645  				return io.ErrUnexpectedEOF
   646  			}
   647  			iNdEx += skippy
   648  		}
   649  	}
   650  
   651  	if iNdEx > l {
   652  		return io.ErrUnexpectedEOF
   653  	}
   654  	return nil
   655  }
   656  func (m *UserLoginResponse) Unmarshal(dAtA []byte) error {
   657  	l := len(dAtA)
   658  	iNdEx := 0
   659  	for iNdEx < l {
   660  		preIndex := iNdEx
   661  		var wire uint64
   662  		for shift := uint(0); ; shift += 7 {
   663  			if shift >= 64 {
   664  				return ErrIntOverflowAuthentication
   665  			}
   666  			if iNdEx >= l {
   667  				return io.ErrUnexpectedEOF
   668  			}
   669  			b := dAtA[iNdEx]
   670  			iNdEx++
   671  			wire |= (uint64(b) & 0x7F) << shift
   672  			if b < 0x80 {
   673  				break
   674  			}
   675  		}
   676  		fieldNum := int32(wire >> 3)
   677  		wireType := int(wire & 0x7)
   678  		if wireType == 4 {
   679  			return fmt.Errorf("proto: UserLoginResponse: wiretype end group for non-group")
   680  		}
   681  		if fieldNum <= 0 {
   682  			return fmt.Errorf("proto: UserLoginResponse: illegal tag %d (wire type %d)", fieldNum, wire)
   683  		}
   684  		switch fieldNum {
   685  		default:
   686  			iNdEx = preIndex
   687  			skippy, err := skipAuthentication(dAtA[iNdEx:])
   688  			if err != nil {
   689  				return err
   690  			}
   691  			if skippy < 0 {
   692  				return ErrInvalidLengthAuthentication
   693  			}
   694  			if (iNdEx + skippy) > l {
   695  				return io.ErrUnexpectedEOF
   696  			}
   697  			iNdEx += skippy
   698  		}
   699  	}
   700  
   701  	if iNdEx > l {
   702  		return io.ErrUnexpectedEOF
   703  	}
   704  	return nil
   705  }
   706  func (m *UserLogoutRequest) Unmarshal(dAtA []byte) error {
   707  	l := len(dAtA)
   708  	iNdEx := 0
   709  	for iNdEx < l {
   710  		preIndex := iNdEx
   711  		var wire uint64
   712  		for shift := uint(0); ; shift += 7 {
   713  			if shift >= 64 {
   714  				return ErrIntOverflowAuthentication
   715  			}
   716  			if iNdEx >= l {
   717  				return io.ErrUnexpectedEOF
   718  			}
   719  			b := dAtA[iNdEx]
   720  			iNdEx++
   721  			wire |= (uint64(b) & 0x7F) << shift
   722  			if b < 0x80 {
   723  				break
   724  			}
   725  		}
   726  		fieldNum := int32(wire >> 3)
   727  		wireType := int(wire & 0x7)
   728  		if wireType == 4 {
   729  			return fmt.Errorf("proto: UserLogoutRequest: wiretype end group for non-group")
   730  		}
   731  		if fieldNum <= 0 {
   732  			return fmt.Errorf("proto: UserLogoutRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   733  		}
   734  		switch fieldNum {
   735  		default:
   736  			iNdEx = preIndex
   737  			skippy, err := skipAuthentication(dAtA[iNdEx:])
   738  			if err != nil {
   739  				return err
   740  			}
   741  			if skippy < 0 {
   742  				return ErrInvalidLengthAuthentication
   743  			}
   744  			if (iNdEx + skippy) > l {
   745  				return io.ErrUnexpectedEOF
   746  			}
   747  			iNdEx += skippy
   748  		}
   749  	}
   750  
   751  	if iNdEx > l {
   752  		return io.ErrUnexpectedEOF
   753  	}
   754  	return nil
   755  }
   756  func (m *UserLogoutResponse) Unmarshal(dAtA []byte) error {
   757  	l := len(dAtA)
   758  	iNdEx := 0
   759  	for iNdEx < l {
   760  		preIndex := iNdEx
   761  		var wire uint64
   762  		for shift := uint(0); ; shift += 7 {
   763  			if shift >= 64 {
   764  				return ErrIntOverflowAuthentication
   765  			}
   766  			if iNdEx >= l {
   767  				return io.ErrUnexpectedEOF
   768  			}
   769  			b := dAtA[iNdEx]
   770  			iNdEx++
   771  			wire |= (uint64(b) & 0x7F) << shift
   772  			if b < 0x80 {
   773  				break
   774  			}
   775  		}
   776  		fieldNum := int32(wire >> 3)
   777  		wireType := int(wire & 0x7)
   778  		if wireType == 4 {
   779  			return fmt.Errorf("proto: UserLogoutResponse: wiretype end group for non-group")
   780  		}
   781  		if fieldNum <= 0 {
   782  			return fmt.Errorf("proto: UserLogoutResponse: illegal tag %d (wire type %d)", fieldNum, wire)
   783  		}
   784  		switch fieldNum {
   785  		default:
   786  			iNdEx = preIndex
   787  			skippy, err := skipAuthentication(dAtA[iNdEx:])
   788  			if err != nil {
   789  				return err
   790  			}
   791  			if skippy < 0 {
   792  				return ErrInvalidLengthAuthentication
   793  			}
   794  			if (iNdEx + skippy) > l {
   795  				return io.ErrUnexpectedEOF
   796  			}
   797  			iNdEx += skippy
   798  		}
   799  	}
   800  
   801  	if iNdEx > l {
   802  		return io.ErrUnexpectedEOF
   803  	}
   804  	return nil
   805  }
   806  func (m *SessionCookie) Unmarshal(dAtA []byte) error {
   807  	l := len(dAtA)
   808  	iNdEx := 0
   809  	for iNdEx < l {
   810  		preIndex := iNdEx
   811  		var wire uint64
   812  		for shift := uint(0); ; shift += 7 {
   813  			if shift >= 64 {
   814  				return ErrIntOverflowAuthentication
   815  			}
   816  			if iNdEx >= l {
   817  				return io.ErrUnexpectedEOF
   818  			}
   819  			b := dAtA[iNdEx]
   820  			iNdEx++
   821  			wire |= (uint64(b) & 0x7F) << shift
   822  			if b < 0x80 {
   823  				break
   824  			}
   825  		}
   826  		fieldNum := int32(wire >> 3)
   827  		wireType := int(wire & 0x7)
   828  		if wireType == 4 {
   829  			return fmt.Errorf("proto: SessionCookie: wiretype end group for non-group")
   830  		}
   831  		if fieldNum <= 0 {
   832  			return fmt.Errorf("proto: SessionCookie: illegal tag %d (wire type %d)", fieldNum, wire)
   833  		}
   834  		switch fieldNum {
   835  		case 1:
   836  			if wireType != 0 {
   837  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
   838  			}
   839  			m.ID = 0
   840  			for shift := uint(0); ; shift += 7 {
   841  				if shift >= 64 {
   842  					return ErrIntOverflowAuthentication
   843  				}
   844  				if iNdEx >= l {
   845  					return io.ErrUnexpectedEOF
   846  				}
   847  				b := dAtA[iNdEx]
   848  				iNdEx++
   849  				m.ID |= (int64(b) & 0x7F) << shift
   850  				if b < 0x80 {
   851  					break
   852  				}
   853  			}
   854  		case 2:
   855  			if wireType != 2 {
   856  				return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
   857  			}
   858  			var byteLen int
   859  			for shift := uint(0); ; shift += 7 {
   860  				if shift >= 64 {
   861  					return ErrIntOverflowAuthentication
   862  				}
   863  				if iNdEx >= l {
   864  					return io.ErrUnexpectedEOF
   865  				}
   866  				b := dAtA[iNdEx]
   867  				iNdEx++
   868  				byteLen |= (int(b) & 0x7F) << shift
   869  				if b < 0x80 {
   870  					break
   871  				}
   872  			}
   873  			if byteLen < 0 {
   874  				return ErrInvalidLengthAuthentication
   875  			}
   876  			postIndex := iNdEx + byteLen
   877  			if postIndex > l {
   878  				return io.ErrUnexpectedEOF
   879  			}
   880  			m.Secret = append(m.Secret[:0], dAtA[iNdEx:postIndex]...)
   881  			if m.Secret == nil {
   882  				m.Secret = []byte{}
   883  			}
   884  			iNdEx = postIndex
   885  		default:
   886  			iNdEx = preIndex
   887  			skippy, err := skipAuthentication(dAtA[iNdEx:])
   888  			if err != nil {
   889  				return err
   890  			}
   891  			if skippy < 0 {
   892  				return ErrInvalidLengthAuthentication
   893  			}
   894  			if (iNdEx + skippy) > l {
   895  				return io.ErrUnexpectedEOF
   896  			}
   897  			iNdEx += skippy
   898  		}
   899  	}
   900  
   901  	if iNdEx > l {
   902  		return io.ErrUnexpectedEOF
   903  	}
   904  	return nil
   905  }
   906  func skipAuthentication(dAtA []byte) (n int, err error) {
   907  	l := len(dAtA)
   908  	iNdEx := 0
   909  	for iNdEx < l {
   910  		var wire uint64
   911  		for shift := uint(0); ; shift += 7 {
   912  			if shift >= 64 {
   913  				return 0, ErrIntOverflowAuthentication
   914  			}
   915  			if iNdEx >= l {
   916  				return 0, io.ErrUnexpectedEOF
   917  			}
   918  			b := dAtA[iNdEx]
   919  			iNdEx++
   920  			wire |= (uint64(b) & 0x7F) << shift
   921  			if b < 0x80 {
   922  				break
   923  			}
   924  		}
   925  		wireType := int(wire & 0x7)
   926  		switch wireType {
   927  		case 0:
   928  			for shift := uint(0); ; shift += 7 {
   929  				if shift >= 64 {
   930  					return 0, ErrIntOverflowAuthentication
   931  				}
   932  				if iNdEx >= l {
   933  					return 0, io.ErrUnexpectedEOF
   934  				}
   935  				iNdEx++
   936  				if dAtA[iNdEx-1] < 0x80 {
   937  					break
   938  				}
   939  			}
   940  			return iNdEx, nil
   941  		case 1:
   942  			iNdEx += 8
   943  			return iNdEx, nil
   944  		case 2:
   945  			var length int
   946  			for shift := uint(0); ; shift += 7 {
   947  				if shift >= 64 {
   948  					return 0, ErrIntOverflowAuthentication
   949  				}
   950  				if iNdEx >= l {
   951  					return 0, io.ErrUnexpectedEOF
   952  				}
   953  				b := dAtA[iNdEx]
   954  				iNdEx++
   955  				length |= (int(b) & 0x7F) << shift
   956  				if b < 0x80 {
   957  					break
   958  				}
   959  			}
   960  			iNdEx += length
   961  			if length < 0 {
   962  				return 0, ErrInvalidLengthAuthentication
   963  			}
   964  			return iNdEx, nil
   965  		case 3:
   966  			for {
   967  				var innerWire uint64
   968  				var start int = iNdEx
   969  				for shift := uint(0); ; shift += 7 {
   970  					if shift >= 64 {
   971  						return 0, ErrIntOverflowAuthentication
   972  					}
   973  					if iNdEx >= l {
   974  						return 0, io.ErrUnexpectedEOF
   975  					}
   976  					b := dAtA[iNdEx]
   977  					iNdEx++
   978  					innerWire |= (uint64(b) & 0x7F) << shift
   979  					if b < 0x80 {
   980  						break
   981  					}
   982  				}
   983  				innerWireType := int(innerWire & 0x7)
   984  				if innerWireType == 4 {
   985  					break
   986  				}
   987  				next, err := skipAuthentication(dAtA[start:])
   988  				if err != nil {
   989  					return 0, err
   990  				}
   991  				iNdEx = start + next
   992  			}
   993  			return iNdEx, nil
   994  		case 4:
   995  			return iNdEx, nil
   996  		case 5:
   997  			iNdEx += 4
   998  			return iNdEx, nil
   999  		default:
  1000  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1001  		}
  1002  	}
  1003  	panic("unreachable")
  1004  }
  1005  
  1006  var (
  1007  	ErrInvalidLengthAuthentication = fmt.Errorf("proto: negative length found during unmarshaling")
  1008  	ErrIntOverflowAuthentication   = fmt.Errorf("proto: integer overflow")
  1009  )
  1010  
  1011  func init() {
  1012  	proto.RegisterFile("server/serverpb/authentication.proto", fileDescriptor_authentication_38fb587d3f7ced6d)
  1013  }
  1014  
  1015  var fileDescriptor_authentication_38fb587d3f7ced6d = []byte{
  1016  	// 378 bytes of a gzipped FileDescriptorProto
  1017  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x6a, 0xdb, 0x40,
  1018  	0x14, 0x85, 0x35, 0x2a, 0x55, 0xed, 0x69, 0x4b, 0xeb, 0xa9, 0x31, 0xae, 0x28, 0xd3, 0x22, 0xba,
  1019  	0x28, 0x6e, 0x2b, 0x81, 0xb3, 0xcb, 0x26, 0xe0, 0x64, 0xe3, 0x60, 0x08, 0x28, 0x64, 0x93, 0x9d,
  1020  	0x2c, 0x0f, 0xf2, 0x60, 0x67, 0xae, 0x32, 0x33, 0x4a, 0x48, 0x96, 0x26, 0x0f, 0x10, 0xc8, 0x4b,
  1021  	0x79, 0x69, 0xc8, 0xc6, 0xab, 0x90, 0xc8, 0x79, 0x90, 0xa0, 0x1f, 0xff, 0x10, 0x08, 0x78, 0x25,
  1022  	0xdd, 0x7b, 0xce, 0x9c, 0xf9, 0xee, 0x65, 0xf0, 0x6f, 0xc5, 0xe4, 0x05, 0x93, 0x5e, 0xf1, 0x89,
  1023  	0xfb, 0x5e, 0x90, 0xe8, 0x21, 0x13, 0x9a, 0x87, 0x81, 0xe6, 0x20, 0xdc, 0x58, 0x82, 0x06, 0xf2,
  1024  	0x3d, 0x84, 0x70, 0x24, 0x21, 0x08, 0x87, 0x6e, 0x61, 0x74, 0x97, 0x7e, 0xbb, 0x1e, 0x41, 0x04,
  1025  	0xb9, 0xcb, 0xcb, 0xfe, 0x8a, 0x03, 0xf6, 0x8f, 0x08, 0x20, 0x1a, 0x33, 0x2f, 0x88, 0xb9, 0x17,
  1026  	0x08, 0x01, 0x3a, 0x4f, 0x53, 0x85, 0xea, 0x1c, 0xe2, 0xaf, 0x27, 0x8a, 0xc9, 0x1e, 0x44, 0x5c,
  1027  	0xf8, 0xec, 0x3c, 0x61, 0x4a, 0x13, 0x1b, 0x57, 0x12, 0xc5, 0xa4, 0x08, 0xce, 0x58, 0x13, 0xfd,
  1028  	0x42, 0x7f, 0xaa, 0xfe, 0xaa, 0xce, 0xb4, 0x38, 0x50, 0xea, 0x12, 0xe4, 0xa0, 0x69, 0x16, 0xda,
  1029  	0xb2, 0x76, 0xbe, 0xe1, 0xda, 0x46, 0x96, 0x8a, 0x41, 0x28, 0xb6, 0xd1, 0x84, 0x44, 0x97, 0x37,
  1030  	0x38, 0x75, 0x4c, 0x36, 0x9b, 0xa5, 0x75, 0x0f, 0x7f, 0x3e, 0x66, 0x4a, 0x71, 0x10, 0xfb, 0x00,
  1031  	0x23, 0xce, 0x48, 0x03, 0x9b, 0x7c, 0x90, 0x23, 0xbc, 0xeb, 0x58, 0xe9, 0xc3, 0x4f, 0xb3, 0x7b,
  1032  	0xe0, 0x9b, 0x7c, 0x40, 0x1a, 0xd8, 0x52, 0x2c, 0x94, 0x4c, 0xe7, 0x08, 0x9f, 0xfc, 0xb2, 0x6a,
  1033  	0x4f, 0x10, 0x7e, 0xdf, 0x83, 0xa8, 0x2b, 0xc8, 0x15, 0xae, 0xae, 0x50, 0xc8, 0x5f, 0xf7, 0xcd,
  1034  	0x9d, 0xb9, 0xaf, 0x87, 0xb7, 0xff, 0x6d, 0x67, 0x2e, 0x91, 0x6b, 0x93, 0xfb, 0xe7, 0x3b, 0xf3,
  1035  	0xa3, 0x63, 0x79, 0xe3, 0xac, 0xbf, 0x8b, 0x5a, 0xed, 0x1b, 0x84, 0xad, 0x1e, 0x44, 0x47, 0x89,
  1036  	0x26, 0xd7, 0x18, 0xaf, 0xc7, 0x24, 0x5b, 0x24, 0xaf, 0x57, 0x64, 0xff, 0xdf, 0xd2, 0x5d, 0x82,
  1037  	0x7c, 0xc9, 0x41, 0xaa, 0xe4, 0x43, 0x06, 0x02, 0x89, 0xee, 0xb4, 0xa6, 0x4f, 0xd4, 0x98, 0xa6,
  1038  	0x14, 0xcd, 0x52, 0x8a, 0xe6, 0x29, 0x45, 0x8f, 0x29, 0x45, 0xb7, 0x0b, 0x6a, 0xcc, 0x16, 0xd4,
  1039  	0x98, 0x2f, 0xa8, 0x71, 0x5a, 0x59, 0xe6, 0xf5, 0xad, 0xfc, 0x2d, 0xec, 0xbc, 0x04, 0x00, 0x00,
  1040  	0xff, 0xff, 0x5e, 0xfd, 0xe4, 0x94, 0x82, 0x02, 0x00, 0x00,
  1041  }