v1

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthService_Authorize_FullMethodName    = "/auth.v1.AuthService/Authorize"
	AuthService_Authenticate_FullMethodName = "/auth.v1.AuthService/Authenticate"
)

Variables

View Source
var AuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "auth.v1.AuthService",
	HandlerType: (*AuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authorize",
			Handler:    _AuthService_Authorize_Handler,
		},
		{
			MethodName: "Authenticate",
			Handler:    _AuthService_Authenticate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth/v1/auth.proto",
}

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)

View Source
var File_auth_v1_auth_proto protoreflect.FileDescriptor

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

Types

type AuthNReq

type AuthNReq struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthNReq) Descriptor deprecated

func (*AuthNReq) Descriptor() ([]byte, []int)

Deprecated: Use AuthNReq.ProtoReflect.Descriptor instead.

func (*AuthNReq) GetToken

func (x *AuthNReq) GetToken() string

func (*AuthNReq) ProtoMessage

func (*AuthNReq) ProtoMessage()

func (*AuthNReq) ProtoReflect

func (x *AuthNReq) ProtoReflect() protoreflect.Message

func (*AuthNReq) Reset

func (x *AuthNReq) Reset()

func (*AuthNReq) String

func (x *AuthNReq) String() string

type AuthNRes

type AuthNRes struct {
	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                             // id
	UserId   string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`       // user id
	DomainId string `protobuf:"bytes,3,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"` // domain id
	// contains filtered or unexported fields
}

func (*AuthNRes) Descriptor deprecated

func (*AuthNRes) Descriptor() ([]byte, []int)

Deprecated: Use AuthNRes.ProtoReflect.Descriptor instead.

func (*AuthNRes) GetDomainId

func (x *AuthNRes) GetDomainId() string

func (*AuthNRes) GetId

func (x *AuthNRes) GetId() string

func (*AuthNRes) GetUserId

func (x *AuthNRes) GetUserId() string

func (*AuthNRes) ProtoMessage

func (*AuthNRes) ProtoMessage()

func (*AuthNRes) ProtoReflect

func (x *AuthNRes) ProtoReflect() protoreflect.Message

func (*AuthNRes) Reset

func (x *AuthNRes) Reset()

func (*AuthNRes) String

func (x *AuthNRes) String() string

type AuthServiceClient

type AuthServiceClient interface {
	Authorize(ctx context.Context, in *AuthZReq, opts ...grpc.CallOption) (*AuthZRes, error)
	Authenticate(ctx context.Context, in *AuthNReq, opts ...grpc.CallOption) (*AuthNRes, error)
}

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.

AuthService is a service that provides authentication and authorization functionalities for SuperMQ services.

type AuthServiceServer

type AuthServiceServer interface {
	Authorize(context.Context, *AuthZReq) (*AuthZRes, error)
	Authenticate(context.Context, *AuthNReq) (*AuthNRes, error)
	// contains filtered or unexported methods
}

AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility.

AuthService is a service that provides authentication and authorization functionalities for SuperMQ services.

type AuthZReq

type AuthZReq struct {
	Domain          string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`                                          // Domain
	SubjectType     string `protobuf:"bytes,2,opt,name=subject_type,json=subjectType,proto3" json:"subject_type,omitempty"`             // Client or User
	SubjectKind     string `protobuf:"bytes,3,opt,name=subject_kind,json=subjectKind,proto3" json:"subject_kind,omitempty"`             // ID or Token
	SubjectRelation string `protobuf:"bytes,4,opt,name=subject_relation,json=subjectRelation,proto3" json:"subject_relation,omitempty"` // Subject relation
	Subject         string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"`                                        // Subject value (id or token, depending on kind)
	Relation        string `protobuf:"bytes,6,opt,name=relation,proto3" json:"relation,omitempty"`                                      // Relation to filter
	Permission      string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"`                                  // Action
	Object          string `protobuf:"bytes,8,opt,name=object,proto3" json:"object,omitempty"`                                          // Object ID
	ObjectType      string `protobuf:"bytes,9,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"`                // Client, User, Group
	// contains filtered or unexported fields
}

func (*AuthZReq) Descriptor deprecated

func (*AuthZReq) Descriptor() ([]byte, []int)

Deprecated: Use AuthZReq.ProtoReflect.Descriptor instead.

func (*AuthZReq) GetDomain

func (x *AuthZReq) GetDomain() string

func (*AuthZReq) GetObject

func (x *AuthZReq) GetObject() string

func (*AuthZReq) GetObjectType

func (x *AuthZReq) GetObjectType() string

func (*AuthZReq) GetPermission

func (x *AuthZReq) GetPermission() string

func (*AuthZReq) GetRelation

func (x *AuthZReq) GetRelation() string

func (*AuthZReq) GetSubject

func (x *AuthZReq) GetSubject() string

func (*AuthZReq) GetSubjectKind

func (x *AuthZReq) GetSubjectKind() string

func (*AuthZReq) GetSubjectRelation

func (x *AuthZReq) GetSubjectRelation() string

func (*AuthZReq) GetSubjectType

func (x *AuthZReq) GetSubjectType() string

func (*AuthZReq) ProtoMessage

func (*AuthZReq) ProtoMessage()

func (*AuthZReq) ProtoReflect

func (x *AuthZReq) ProtoReflect() protoreflect.Message

func (*AuthZReq) Reset

func (x *AuthZReq) Reset()

func (*AuthZReq) String

func (x *AuthZReq) String() string

type AuthZRes

type AuthZRes struct {
	Authorized bool   `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
	Id         string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthZRes) Descriptor deprecated

func (*AuthZRes) Descriptor() ([]byte, []int)

Deprecated: Use AuthZRes.ProtoReflect.Descriptor instead.

func (*AuthZRes) GetAuthorized

func (x *AuthZRes) GetAuthorized() bool

func (*AuthZRes) GetId

func (x *AuthZRes) GetId() string

func (*AuthZRes) ProtoMessage

func (*AuthZRes) ProtoMessage()

func (*AuthZRes) ProtoReflect

func (x *AuthZRes) ProtoReflect() protoreflect.Message

func (*AuthZRes) Reset

func (x *AuthZRes) Reset()

func (*AuthZRes) String

func (x *AuthZRes) String() string

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct{}

UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAuthServiceServer) Authenticate

func (UnimplementedAuthServiceServer) Authorize

type UnsafeAuthServiceServer

type UnsafeAuthServiceServer interface {
	// contains filtered or unexported methods
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL