auth

package
v0.0.72-alpha.51 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_auth_auth_proto protoreflect.FileDescriptor

Functions

func RegisterAuthServer

func RegisterAuthServer(s *grpc.Server, srv AuthServer)

Types

type AuthClient

type AuthClient interface {
	// Generate token
	GetAdminToken(ctx context.Context, in *GetAdminTokenReq, opts ...grpc.CallOption) (*GetAdminTokenResp, error)
	// Admin retrieves user token
	GetUserToken(ctx context.Context, in *GetUserTokenReq, opts ...grpc.CallOption) (*GetUserTokenResp, error)
	// Force logout
	ForceLogout(ctx context.Context, in *ForceLogoutReq, opts ...grpc.CallOption) (*ForceLogoutResp, error)
	// Parse token
	ParseToken(ctx context.Context, in *ParseTokenReq, opts ...grpc.CallOption) (*ParseTokenResp, error)
	// Invalidate or mark the token as kicked out
	InvalidateToken(ctx context.Context, in *InvalidateTokenReq, opts ...grpc.CallOption) (*InvalidateTokenResp, error)
	// kick tokens
	KickTokens(ctx context.Context, in *KickTokensReq, opts ...grpc.CallOption) (*KickTokensResp, error)
}

AuthClient is the client API for Auth service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	// Generate token
	GetAdminToken(context.Context, *GetAdminTokenReq) (*GetAdminTokenResp, error)
	// Admin retrieves user token
	GetUserToken(context.Context, *GetUserTokenReq) (*GetUserTokenResp, error)
	// Force logout
	ForceLogout(context.Context, *ForceLogoutReq) (*ForceLogoutResp, error)
	// Parse token
	ParseToken(context.Context, *ParseTokenReq) (*ParseTokenResp, error)
	// Invalidate or mark the token as kicked out
	InvalidateToken(context.Context, *InvalidateTokenReq) (*InvalidateTokenResp, error)
	// kick tokens
	KickTokens(context.Context, *KickTokensReq) (*KickTokensResp, error)
}

AuthServer is the server API for Auth service.

type ForceLogoutReq

type ForceLogoutReq struct {
	PlatformID int32  `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"`
	UserID     string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
	// contains filtered or unexported fields
}

func (*ForceLogoutReq) Check

func (x *ForceLogoutReq) Check() error

func (*ForceLogoutReq) Descriptor deprecated

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

Deprecated: Use ForceLogoutReq.ProtoReflect.Descriptor instead.

func (*ForceLogoutReq) GetPlatformID

func (x *ForceLogoutReq) GetPlatformID() int32

func (*ForceLogoutReq) GetUserID

func (x *ForceLogoutReq) GetUserID() string

func (*ForceLogoutReq) ProtoMessage

func (*ForceLogoutReq) ProtoMessage()

func (*ForceLogoutReq) ProtoReflect

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

func (*ForceLogoutReq) Reset

func (x *ForceLogoutReq) Reset()

func (*ForceLogoutReq) String

func (x *ForceLogoutReq) String() string

type ForceLogoutResp

type ForceLogoutResp struct {
	// contains filtered or unexported fields
}

func (*ForceLogoutResp) Descriptor deprecated

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

Deprecated: Use ForceLogoutResp.ProtoReflect.Descriptor instead.

func (*ForceLogoutResp) ProtoMessage

func (*ForceLogoutResp) ProtoMessage()

func (*ForceLogoutResp) ProtoReflect

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

func (*ForceLogoutResp) Reset

func (x *ForceLogoutResp) Reset()

func (*ForceLogoutResp) String

func (x *ForceLogoutResp) String() string

type GetAdminTokenReq

type GetAdminTokenReq struct {
	Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret"`
	UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
	// contains filtered or unexported fields
}

func (*GetAdminTokenReq) Check

func (x *GetAdminTokenReq) Check() error

func (*GetAdminTokenReq) Descriptor deprecated

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

Deprecated: Use GetAdminTokenReq.ProtoReflect.Descriptor instead.

func (*GetAdminTokenReq) GetSecret

func (x *GetAdminTokenReq) GetSecret() string

func (*GetAdminTokenReq) GetUserID

func (x *GetAdminTokenReq) GetUserID() string

func (*GetAdminTokenReq) ProtoMessage

func (*GetAdminTokenReq) ProtoMessage()

func (*GetAdminTokenReq) ProtoReflect

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

func (*GetAdminTokenReq) Reset

func (x *GetAdminTokenReq) Reset()

func (*GetAdminTokenReq) String

func (x *GetAdminTokenReq) String() string

type GetAdminTokenResp

type GetAdminTokenResp struct {
	Token             string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"`
	ExpireTimeSeconds int64  `protobuf:"varint,3,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"`
	// contains filtered or unexported fields
}

func (*GetAdminTokenResp) Descriptor deprecated

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

Deprecated: Use GetAdminTokenResp.ProtoReflect.Descriptor instead.

func (*GetAdminTokenResp) GetExpireTimeSeconds

func (x *GetAdminTokenResp) GetExpireTimeSeconds() int64

func (*GetAdminTokenResp) GetToken

func (x *GetAdminTokenResp) GetToken() string

func (*GetAdminTokenResp) ProtoMessage

func (*GetAdminTokenResp) ProtoMessage()

func (*GetAdminTokenResp) ProtoReflect

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

func (*GetAdminTokenResp) Reset

func (x *GetAdminTokenResp) Reset()

func (*GetAdminTokenResp) String

func (x *GetAdminTokenResp) String() string

type GetUserTokenReq

type GetUserTokenReq struct {
	PlatformID int32  `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"`
	UserID     string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
	// contains filtered or unexported fields
}

func (*GetUserTokenReq) Check

func (x *GetUserTokenReq) Check() error

func (*GetUserTokenReq) Descriptor deprecated

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

Deprecated: Use GetUserTokenReq.ProtoReflect.Descriptor instead.

func (*GetUserTokenReq) GetPlatformID

func (x *GetUserTokenReq) GetPlatformID() int32

func (*GetUserTokenReq) GetUserID

func (x *GetUserTokenReq) GetUserID() string

func (*GetUserTokenReq) ProtoMessage

func (*GetUserTokenReq) ProtoMessage()

func (*GetUserTokenReq) ProtoReflect

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

func (*GetUserTokenReq) Reset

func (x *GetUserTokenReq) Reset()

func (*GetUserTokenReq) String

func (x *GetUserTokenReq) String() string

type GetUserTokenResp

type GetUserTokenResp struct {
	Token             string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
	ExpireTimeSeconds int64  `protobuf:"varint,2,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"`
	// contains filtered or unexported fields
}

func (*GetUserTokenResp) Descriptor deprecated

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

Deprecated: Use GetUserTokenResp.ProtoReflect.Descriptor instead.

func (*GetUserTokenResp) GetExpireTimeSeconds

func (x *GetUserTokenResp) GetExpireTimeSeconds() int64

func (*GetUserTokenResp) GetToken

func (x *GetUserTokenResp) GetToken() string

func (*GetUserTokenResp) ProtoMessage

func (*GetUserTokenResp) ProtoMessage()

func (*GetUserTokenResp) ProtoReflect

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

func (*GetUserTokenResp) Reset

func (x *GetUserTokenResp) Reset()

func (*GetUserTokenResp) String

func (x *GetUserTokenResp) String() string

type InvalidateTokenReq

type InvalidateTokenReq struct {
	PreservedToken string `protobuf:"bytes,1,opt,name=preservedToken,proto3" json:"preservedToken"`
	UserID         string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
	PlatformID     int32  `protobuf:"varint,3,opt,name=platformID,proto3" json:"platformID"`
	// contains filtered or unexported fields
}

func (*InvalidateTokenReq) Descriptor deprecated

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

Deprecated: Use InvalidateTokenReq.ProtoReflect.Descriptor instead.

func (*InvalidateTokenReq) GetPlatformID

func (x *InvalidateTokenReq) GetPlatformID() int32

func (*InvalidateTokenReq) GetPreservedToken

func (x *InvalidateTokenReq) GetPreservedToken() string

func (*InvalidateTokenReq) GetUserID

func (x *InvalidateTokenReq) GetUserID() string

func (*InvalidateTokenReq) ProtoMessage

func (*InvalidateTokenReq) ProtoMessage()

func (*InvalidateTokenReq) ProtoReflect

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

func (*InvalidateTokenReq) Reset

func (x *InvalidateTokenReq) Reset()

func (*InvalidateTokenReq) String

func (x *InvalidateTokenReq) String() string

type InvalidateTokenResp

type InvalidateTokenResp struct {
	// contains filtered or unexported fields
}

func (*InvalidateTokenResp) Descriptor deprecated

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

Deprecated: Use InvalidateTokenResp.ProtoReflect.Descriptor instead.

func (*InvalidateTokenResp) ProtoMessage

func (*InvalidateTokenResp) ProtoMessage()

func (*InvalidateTokenResp) ProtoReflect

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

func (*InvalidateTokenResp) Reset

func (x *InvalidateTokenResp) Reset()

func (*InvalidateTokenResp) String

func (x *InvalidateTokenResp) String() string

type KickTokensReq

type KickTokensReq struct {
	Tokens []string `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens"`
	// contains filtered or unexported fields
}

func (*KickTokensReq) Descriptor deprecated

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

Deprecated: Use KickTokensReq.ProtoReflect.Descriptor instead.

func (*KickTokensReq) GetTokens

func (x *KickTokensReq) GetTokens() []string

func (*KickTokensReq) ProtoMessage

func (*KickTokensReq) ProtoMessage()

func (*KickTokensReq) ProtoReflect

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

func (*KickTokensReq) Reset

func (x *KickTokensReq) Reset()

func (*KickTokensReq) String

func (x *KickTokensReq) String() string

type KickTokensResp

type KickTokensResp struct {
	// contains filtered or unexported fields
}

func (*KickTokensResp) Descriptor deprecated

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

Deprecated: Use KickTokensResp.ProtoReflect.Descriptor instead.

func (*KickTokensResp) ProtoMessage

func (*KickTokensResp) ProtoMessage()

func (*KickTokensResp) ProtoReflect

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

func (*KickTokensResp) Reset

func (x *KickTokensResp) Reset()

func (*KickTokensResp) String

func (x *KickTokensResp) String() string

type ParseTokenReq

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

func (*ParseTokenReq) Check

func (x *ParseTokenReq) Check() error

func (*ParseTokenReq) Descriptor deprecated

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

Deprecated: Use ParseTokenReq.ProtoReflect.Descriptor instead.

func (*ParseTokenReq) GetToken

func (x *ParseTokenReq) GetToken() string

func (*ParseTokenReq) ProtoMessage

func (*ParseTokenReq) ProtoMessage()

func (*ParseTokenReq) ProtoReflect

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

func (*ParseTokenReq) Reset

func (x *ParseTokenReq) Reset()

func (*ParseTokenReq) String

func (x *ParseTokenReq) String() string

type ParseTokenResp

type ParseTokenResp struct {
	UserID            string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
	PlatformID        int32  `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"`
	ExpireTimeSeconds int64  `protobuf:"varint,4,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"`
	// contains filtered or unexported fields
}

func (*ParseTokenResp) Descriptor deprecated

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

Deprecated: Use ParseTokenResp.ProtoReflect.Descriptor instead.

func (*ParseTokenResp) GetExpireTimeSeconds

func (x *ParseTokenResp) GetExpireTimeSeconds() int64

func (*ParseTokenResp) GetPlatformID

func (x *ParseTokenResp) GetPlatformID() int32

func (*ParseTokenResp) GetUserID

func (x *ParseTokenResp) GetUserID() string

func (*ParseTokenResp) ProtoMessage

func (*ParseTokenResp) ProtoMessage()

func (*ParseTokenResp) ProtoReflect

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

func (*ParseTokenResp) Reset

func (x *ParseTokenResp) Reset()

func (*ParseTokenResp) String

func (x *ParseTokenResp) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthServer) ForceLogout

func (*UnimplementedAuthServer) GetAdminToken

func (*UnimplementedAuthServer) GetUserToken

func (*UnimplementedAuthServer) InvalidateToken

func (*UnimplementedAuthServer) KickTokens

func (*UnimplementedAuthServer) ParseToken

Jump to

Keyboard shortcuts

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