// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v4.22.2
// source: auth.proto

package proto

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// PasswordAuthenticatorClient is the client API for PasswordAuthenticator service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type PasswordAuthenticatorClient interface {
	Authenticate(ctx context.Context, in *CredentialsRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
}

type passwordAuthenticatorClient struct {
	cc grpc.ClientConnInterface
}

func NewPasswordAuthenticatorClient(cc grpc.ClientConnInterface) PasswordAuthenticatorClient {
	return &passwordAuthenticatorClient{cc}
}

func (c *passwordAuthenticatorClient) Authenticate(ctx context.Context, in *CredentialsRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) {
	out := new(AuthenticateResponse)
	err := c.cc.Invoke(ctx, "/proto.PasswordAuthenticator/Authenticate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PasswordAuthenticatorServer is the server API for PasswordAuthenticator service.
// All implementations must embed UnimplementedPasswordAuthenticatorServer
// for forward compatibility
type PasswordAuthenticatorServer interface {
	Authenticate(context.Context, *CredentialsRequest) (*AuthenticateResponse, error)
	mustEmbedUnimplementedPasswordAuthenticatorServer()
}

// UnimplementedPasswordAuthenticatorServer must be embedded to have forward compatible implementations.
type UnimplementedPasswordAuthenticatorServer struct {
}

func (UnimplementedPasswordAuthenticatorServer) Authenticate(context.Context, *CredentialsRequest) (*AuthenticateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented")
}
func (UnimplementedPasswordAuthenticatorServer) mustEmbedUnimplementedPasswordAuthenticatorServer() {}

// UnsafePasswordAuthenticatorServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PasswordAuthenticatorServer will
// result in compilation errors.
type UnsafePasswordAuthenticatorServer interface {
	mustEmbedUnimplementedPasswordAuthenticatorServer()
}

func RegisterPasswordAuthenticatorServer(s grpc.ServiceRegistrar, srv PasswordAuthenticatorServer) {
	s.RegisterService(&PasswordAuthenticator_ServiceDesc, srv)
}

func _PasswordAuthenticator_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CredentialsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PasswordAuthenticatorServer).Authenticate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/proto.PasswordAuthenticator/Authenticate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PasswordAuthenticatorServer).Authenticate(ctx, req.(*CredentialsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// PasswordAuthenticator_ServiceDesc is the grpc.ServiceDesc for PasswordAuthenticator service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PasswordAuthenticator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.PasswordAuthenticator",
	HandlerType: (*PasswordAuthenticatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authenticate",
			Handler:    _PasswordAuthenticator_Authenticate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth.proto",
}
