mirror of
https://github.com/hexolan/stocklet.git
synced 2026-03-26 11:41:18 +00:00
feat: protobuf service interface (`AuthServiceServer`) methods comparison against implemented `AuthService` at compile time
538 lines
23 KiB
Go
538 lines
23 KiB
Go
// Copyright (C) 2025 Declan Teevan
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU Affero General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.3.0
|
|
// - protoc (unknown)
|
|
// source: stocklet/auth/v1/service.proto
|
|
|
|
package auth_v1
|
|
|
|
import (
|
|
context "context"
|
|
v1 "github.com/hexolan/stocklet/internal/pkg/protogen/common/v1"
|
|
v11 "github.com/hexolan/stocklet/internal/pkg/protogen/events/v1"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// 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
|
|
|
|
const (
|
|
AuthService_ServiceInfo_FullMethodName = "/stocklet.auth.v1.AuthService/ServiceInfo"
|
|
AuthService_GetJwks_FullMethodName = "/stocklet.auth.v1.AuthService/GetJwks"
|
|
AuthService_GetOpenIDProviderConfig_FullMethodName = "/stocklet.auth.v1.AuthService/GetOpenIDProviderConfig"
|
|
AuthService_OAuthAuthorize_FullMethodName = "/stocklet.auth.v1.AuthService/OAuthAuthorize"
|
|
AuthService_OAuthToken_FullMethodName = "/stocklet.auth.v1.AuthService/OAuthToken"
|
|
AuthService_OAuthTokenRevocation_FullMethodName = "/stocklet.auth.v1.AuthService/OAuthTokenRevocation"
|
|
AuthService_OAuthTokenIntrospection_FullMethodName = "/stocklet.auth.v1.AuthService/OAuthTokenIntrospection"
|
|
AuthService_OpenIDUserInfo_FullMethodName = "/stocklet.auth.v1.AuthService/OpenIDUserInfo"
|
|
AuthService_LoginPassword_FullMethodName = "/stocklet.auth.v1.AuthService/LoginPassword"
|
|
AuthService_SetPassword_FullMethodName = "/stocklet.auth.v1.AuthService/SetPassword"
|
|
AuthService_ProcessUserDeletedEvent_FullMethodName = "/stocklet.auth.v1.AuthService/ProcessUserDeletedEvent"
|
|
)
|
|
|
|
// AuthServiceClient is the client API for AuthService 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 AuthServiceClient interface {
|
|
// View information about the service.
|
|
//
|
|
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
|
|
ServiceInfo(ctx context.Context, in *v1.ServiceInfoRequest, opts ...grpc.CallOption) (*v1.ServiceInfoResponse, error)
|
|
GetJwks(ctx context.Context, in *GetJwksRequest, opts ...grpc.CallOption) (*GetJwksResponse, error)
|
|
// OpenID Connect Discovery Endpoint
|
|
// spec: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest
|
|
GetOpenIDProviderConfig(ctx context.Context, in *GetOpenIDProviderConfigRequest, opts ...grpc.CallOption) (*GetOpenIDProviderConfigResponse, error)
|
|
// OAuth 2.0 Endpoint
|
|
// spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.1
|
|
OAuthAuthorize(ctx context.Context, in *OAuthAuthorizeRequest, opts ...grpc.CallOption) (*OAuthAuthorizeResponse, error)
|
|
// OAuth 2.0 Endpoint
|
|
// spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.2
|
|
OAuthToken(ctx context.Context, in *OAuthTokenRequest, opts ...grpc.CallOption) (*OAuthTokenResponse, error)
|
|
// OAuth 2.0 Endpoint
|
|
// spec (RFC 7009): https://www.rfc-editor.org/rfc/rfc7009
|
|
OAuthTokenRevocation(ctx context.Context, in *OAuthTokenRevocationRequest, opts ...grpc.CallOption) (*OAuthTokenRevocationResponse, error)
|
|
// OAuth 2.0 Endpoint
|
|
// spec (RFC 7662): https://www.rfc-editor.org/rfc/rfc7662
|
|
OAuthTokenIntrospection(ctx context.Context, in *OAuthTokenIntrospectionRequest, opts ...grpc.CallOption) (*OAuthTokenIntrospectionResponse, error)
|
|
// OpenID Connect Endpoint
|
|
// spec: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo
|
|
OpenIDUserInfo(ctx context.Context, in *OpenIDUserInfoRequest, opts ...grpc.CallOption) (*OpenIDUserInfoResponse, error)
|
|
LoginPassword(ctx context.Context, in *LoginPasswordRequest, opts ...grpc.CallOption) (*LoginPasswordResponse, error)
|
|
SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*SetPasswordResponse, error)
|
|
// A consumer will call this method to process events.
|
|
//
|
|
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
|
|
// buf:lint:ignore RPC_REQUEST_STANDARD_NAME
|
|
// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
|
|
ProcessUserDeletedEvent(ctx context.Context, in *v11.UserDeletedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
}
|
|
|
|
type authServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
|
|
return &authServiceClient{cc}
|
|
}
|
|
|
|
func (c *authServiceClient) ServiceInfo(ctx context.Context, in *v1.ServiceInfoRequest, opts ...grpc.CallOption) (*v1.ServiceInfoResponse, error) {
|
|
out := new(v1.ServiceInfoResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_ServiceInfo_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) GetJwks(ctx context.Context, in *GetJwksRequest, opts ...grpc.CallOption) (*GetJwksResponse, error) {
|
|
out := new(GetJwksResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_GetJwks_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) GetOpenIDProviderConfig(ctx context.Context, in *GetOpenIDProviderConfigRequest, opts ...grpc.CallOption) (*GetOpenIDProviderConfigResponse, error) {
|
|
out := new(GetOpenIDProviderConfigResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_GetOpenIDProviderConfig_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) OAuthAuthorize(ctx context.Context, in *OAuthAuthorizeRequest, opts ...grpc.CallOption) (*OAuthAuthorizeResponse, error) {
|
|
out := new(OAuthAuthorizeResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_OAuthAuthorize_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) OAuthToken(ctx context.Context, in *OAuthTokenRequest, opts ...grpc.CallOption) (*OAuthTokenResponse, error) {
|
|
out := new(OAuthTokenResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_OAuthToken_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) OAuthTokenRevocation(ctx context.Context, in *OAuthTokenRevocationRequest, opts ...grpc.CallOption) (*OAuthTokenRevocationResponse, error) {
|
|
out := new(OAuthTokenRevocationResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_OAuthTokenRevocation_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) OAuthTokenIntrospection(ctx context.Context, in *OAuthTokenIntrospectionRequest, opts ...grpc.CallOption) (*OAuthTokenIntrospectionResponse, error) {
|
|
out := new(OAuthTokenIntrospectionResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_OAuthTokenIntrospection_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) OpenIDUserInfo(ctx context.Context, in *OpenIDUserInfoRequest, opts ...grpc.CallOption) (*OpenIDUserInfoResponse, error) {
|
|
out := new(OpenIDUserInfoResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_OpenIDUserInfo_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) LoginPassword(ctx context.Context, in *LoginPasswordRequest, opts ...grpc.CallOption) (*LoginPasswordResponse, error) {
|
|
out := new(LoginPasswordResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_LoginPassword_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*SetPasswordResponse, error) {
|
|
out := new(SetPasswordResponse)
|
|
err := c.cc.Invoke(ctx, AuthService_SetPassword_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) ProcessUserDeletedEvent(ctx context.Context, in *v11.UserDeletedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, AuthService_ProcessUserDeletedEvent_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AuthServiceServer is the server API for AuthService service.
|
|
// All implementations must embed UnimplementedAuthServiceServer
|
|
// for forward compatibility
|
|
type AuthServiceServer interface {
|
|
// View information about the service.
|
|
//
|
|
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
|
|
ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error)
|
|
GetJwks(context.Context, *GetJwksRequest) (*GetJwksResponse, error)
|
|
// OpenID Connect Discovery Endpoint
|
|
// spec: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest
|
|
GetOpenIDProviderConfig(context.Context, *GetOpenIDProviderConfigRequest) (*GetOpenIDProviderConfigResponse, error)
|
|
// OAuth 2.0 Endpoint
|
|
// spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.1
|
|
OAuthAuthorize(context.Context, *OAuthAuthorizeRequest) (*OAuthAuthorizeResponse, error)
|
|
// OAuth 2.0 Endpoint
|
|
// spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.2
|
|
OAuthToken(context.Context, *OAuthTokenRequest) (*OAuthTokenResponse, error)
|
|
// OAuth 2.0 Endpoint
|
|
// spec (RFC 7009): https://www.rfc-editor.org/rfc/rfc7009
|
|
OAuthTokenRevocation(context.Context, *OAuthTokenRevocationRequest) (*OAuthTokenRevocationResponse, error)
|
|
// OAuth 2.0 Endpoint
|
|
// spec (RFC 7662): https://www.rfc-editor.org/rfc/rfc7662
|
|
OAuthTokenIntrospection(context.Context, *OAuthTokenIntrospectionRequest) (*OAuthTokenIntrospectionResponse, error)
|
|
// OpenID Connect Endpoint
|
|
// spec: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo
|
|
OpenIDUserInfo(context.Context, *OpenIDUserInfoRequest) (*OpenIDUserInfoResponse, error)
|
|
LoginPassword(context.Context, *LoginPasswordRequest) (*LoginPasswordResponse, error)
|
|
SetPassword(context.Context, *SetPasswordRequest) (*SetPasswordResponse, error)
|
|
// A consumer will call this method to process events.
|
|
//
|
|
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
|
|
// buf:lint:ignore RPC_REQUEST_STANDARD_NAME
|
|
// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
|
|
ProcessUserDeletedEvent(context.Context, *v11.UserDeletedEvent) (*emptypb.Empty, error)
|
|
mustEmbedUnimplementedAuthServiceServer()
|
|
}
|
|
|
|
// UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedAuthServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedAuthServiceServer) ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ServiceInfo not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) GetJwks(context.Context, *GetJwksRequest) (*GetJwksResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetJwks not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) GetOpenIDProviderConfig(context.Context, *GetOpenIDProviderConfigRequest) (*GetOpenIDProviderConfigResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetOpenIDProviderConfig not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) OAuthAuthorize(context.Context, *OAuthAuthorizeRequest) (*OAuthAuthorizeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthAuthorize not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) OAuthToken(context.Context, *OAuthTokenRequest) (*OAuthTokenResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthToken not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) OAuthTokenRevocation(context.Context, *OAuthTokenRevocationRequest) (*OAuthTokenRevocationResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthTokenRevocation not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) OAuthTokenIntrospection(context.Context, *OAuthTokenIntrospectionRequest) (*OAuthTokenIntrospectionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthTokenIntrospection not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) OpenIDUserInfo(context.Context, *OpenIDUserInfoRequest) (*OpenIDUserInfoResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method OpenIDUserInfo not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) LoginPassword(context.Context, *LoginPasswordRequest) (*LoginPasswordResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method LoginPassword not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) SetPassword(context.Context, *SetPasswordRequest) (*SetPasswordResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SetPassword not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) ProcessUserDeletedEvent(context.Context, *v11.UserDeletedEvent) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ProcessUserDeletedEvent not implemented")
|
|
}
|
|
func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {}
|
|
|
|
// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to AuthServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeAuthServiceServer interface {
|
|
mustEmbedUnimplementedAuthServiceServer()
|
|
}
|
|
|
|
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) {
|
|
s.RegisterService(&AuthService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _AuthService_ServiceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(v1.ServiceInfoRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).ServiceInfo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_ServiceInfo_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).ServiceInfo(ctx, req.(*v1.ServiceInfoRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_GetJwks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetJwksRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).GetJwks(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_GetJwks_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).GetJwks(ctx, req.(*GetJwksRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_GetOpenIDProviderConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetOpenIDProviderConfigRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).GetOpenIDProviderConfig(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_GetOpenIDProviderConfig_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).GetOpenIDProviderConfig(ctx, req.(*GetOpenIDProviderConfigRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_OAuthAuthorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(OAuthAuthorizeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).OAuthAuthorize(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_OAuthAuthorize_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).OAuthAuthorize(ctx, req.(*OAuthAuthorizeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_OAuthToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(OAuthTokenRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).OAuthToken(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_OAuthToken_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).OAuthToken(ctx, req.(*OAuthTokenRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_OAuthTokenRevocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(OAuthTokenRevocationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).OAuthTokenRevocation(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_OAuthTokenRevocation_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).OAuthTokenRevocation(ctx, req.(*OAuthTokenRevocationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_OAuthTokenIntrospection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(OAuthTokenIntrospectionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).OAuthTokenIntrospection(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_OAuthTokenIntrospection_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).OAuthTokenIntrospection(ctx, req.(*OAuthTokenIntrospectionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_OpenIDUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(OpenIDUserInfoRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).OpenIDUserInfo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_OpenIDUserInfo_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).OpenIDUserInfo(ctx, req.(*OpenIDUserInfoRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_LoginPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LoginPasswordRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).LoginPassword(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_LoginPassword_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).LoginPassword(ctx, req.(*LoginPasswordRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_SetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetPasswordRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).SetPassword(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_SetPassword_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).SetPassword(ctx, req.(*SetPasswordRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_ProcessUserDeletedEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(v11.UserDeletedEvent)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).ProcessUserDeletedEvent(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AuthService_ProcessUserDeletedEvent_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).ProcessUserDeletedEvent(ctx, req.(*v11.UserDeletedEvent))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var AuthService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "stocklet.auth.v1.AuthService",
|
|
HandlerType: (*AuthServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ServiceInfo",
|
|
Handler: _AuthService_ServiceInfo_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetJwks",
|
|
Handler: _AuthService_GetJwks_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetOpenIDProviderConfig",
|
|
Handler: _AuthService_GetOpenIDProviderConfig_Handler,
|
|
},
|
|
{
|
|
MethodName: "OAuthAuthorize",
|
|
Handler: _AuthService_OAuthAuthorize_Handler,
|
|
},
|
|
{
|
|
MethodName: "OAuthToken",
|
|
Handler: _AuthService_OAuthToken_Handler,
|
|
},
|
|
{
|
|
MethodName: "OAuthTokenRevocation",
|
|
Handler: _AuthService_OAuthTokenRevocation_Handler,
|
|
},
|
|
{
|
|
MethodName: "OAuthTokenIntrospection",
|
|
Handler: _AuthService_OAuthTokenIntrospection_Handler,
|
|
},
|
|
{
|
|
MethodName: "OpenIDUserInfo",
|
|
Handler: _AuthService_OpenIDUserInfo_Handler,
|
|
},
|
|
{
|
|
MethodName: "LoginPassword",
|
|
Handler: _AuthService_LoginPassword_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetPassword",
|
|
Handler: _AuthService_SetPassword_Handler,
|
|
},
|
|
{
|
|
MethodName: "ProcessUserDeletedEvent",
|
|
Handler: _AuthService_ProcessUserDeletedEvent_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "stocklet/auth/v1/service.proto",
|
|
}
|