Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorAccessForbidden(format string, args ...interface{}) *errors.Error
- func ErrorBadRequest(format string, args ...interface{}) *errors.Error
- func ErrorInternalServerError(format string, args ...interface{}) *errors.Error
- func ErrorInvalidPassword(format string, args ...interface{}) *errors.Error
- func ErrorInvalidToken(format string, args ...interface{}) *errors.Error
- func ErrorInvalidUserid(format string, args ...interface{}) *errors.Error
- func ErrorMethodNotAllowed(format string, args ...interface{}) *errors.Error
- func ErrorNetworkError(format string, args ...interface{}) *errors.Error
- func ErrorNetworkTimeout(format string, args ...interface{}) *errors.Error
- func ErrorNotImplemented(format string, args ...interface{}) *errors.Error
- func ErrorNotLoggedIn(format string, args ...interface{}) *errors.Error
- func ErrorRequestNotSupport(format string, args ...interface{}) *errors.Error
- func ErrorRequestTimeout(format string, args ...interface{}) *errors.Error
- func ErrorResourceNotFound(format string, args ...interface{}) *errors.Error
- func ErrorServiceUnavailable(format string, args ...interface{}) *errors.Error
- func ErrorTokenExpired(format string, args ...interface{}) *errors.Error
- func ErrorTokenNotExist(format string, args ...interface{}) *errors.Error
- func ErrorUserFreeze(format string, args ...interface{}) *errors.Error
- func ErrorUserNotExist(format string, args ...interface{}) *errors.Error
- func IsAccessForbidden(err error) bool
- func IsBadRequest(err error) bool
- func IsInternalServerError(err error) bool
- func IsInvalidPassword(err error) bool
- func IsInvalidToken(err error) bool
- func IsInvalidUserid(err error) bool
- func IsMethodNotAllowed(err error) bool
- func IsNetworkError(err error) bool
- func IsNetworkTimeout(err error) bool
- func IsNotImplemented(err error) bool
- func IsNotLoggedIn(err error) bool
- func IsRequestNotSupport(err error) bool
- func IsRequestTimeout(err error) bool
- func IsResourceNotFound(err error) bool
- func IsServiceUnavailable(err error) bool
- func IsTokenExpired(err error) bool
- func IsTokenNotExist(err error) bool
- func IsUserFreeze(err error) bool
- func IsUserNotExist(err error) bool
- func RegisterAuthenticationServiceHTTPServer(s *http.Server, srv AuthenticationServiceHTTPServer)
- func RegisterAuthenticationServiceServer(s grpc.ServiceRegistrar, srv AuthenticationServiceServer)
- type AuthenticationServiceClient
- type AuthenticationServiceHTTPClient
- type AuthenticationServiceHTTPClientImpl
- func (c *AuthenticationServiceHTTPClientImpl) GetMe(ctx context.Context, in *GetMeRequest, opts ...http.CallOption) (*v1.User, error)
- func (c *AuthenticationServiceHTTPClientImpl) Login(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginResponse, error)
- func (c *AuthenticationServiceHTTPClientImpl) Logout(ctx context.Context, in *LogoutRequest, opts ...http.CallOption) (*emptypb.Empty, error)
- type AuthenticationServiceHTTPServer
- type AuthenticationServiceServer
- type ClientErrorReason
- func (ClientErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ClientErrorReason) Enum() *ClientErrorReason
- func (ClientErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ClientErrorReason) Number() protoreflect.EnumNumber
- func (x ClientErrorReason) String() string
- func (ClientErrorReason) Type() protoreflect.EnumType
- type GetMeRequest
- func (*GetMeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetMeRequest) GetId() uint32
- func (*GetMeRequest) ProtoMessage()
- func (x *GetMeRequest) ProtoReflect() protoreflect.Message
- func (x *GetMeRequest) Reset()
- func (x *GetMeRequest) String() string
- func (m *GetMeRequest) Validate() error
- func (m *GetMeRequest) ValidateAll() error
- type GetMeRequestMultiError
- type GetMeRequestValidationError
- func (e GetMeRequestValidationError) Cause() error
- func (e GetMeRequestValidationError) Error() string
- func (e GetMeRequestValidationError) ErrorName() string
- func (e GetMeRequestValidationError) Field() string
- func (e GetMeRequestValidationError) Key() bool
- func (e GetMeRequestValidationError) Reason() string
- type GrantType
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetClientId() string
- func (x *LoginRequest) GetClientSecret() string
- func (x *LoginRequest) GetGrantType() string
- func (x *LoginRequest) GetPassword() string
- func (x *LoginRequest) GetScope() string
- func (x *LoginRequest) GetUserName() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- func (m *LoginRequest) Validate() error
- func (m *LoginRequest) ValidateAll() error
- type LoginRequestMultiError
- type LoginRequestValidationError
- func (e LoginRequestValidationError) Cause() error
- func (e LoginRequestValidationError) Error() string
- func (e LoginRequestValidationError) ErrorName() string
- func (e LoginRequestValidationError) Field() string
- func (e LoginRequestValidationError) Key() bool
- func (e LoginRequestValidationError) Reason() string
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetAccessToken() string
- func (x *LoginResponse) GetExpiresIn() int64
- func (x *LoginResponse) GetRefreshToken() string
- func (x *LoginResponse) GetScope() string
- func (x *LoginResponse) GetTokenType() string
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- func (m *LoginResponse) Validate() error
- func (m *LoginResponse) ValidateAll() error
- type LoginResponseMultiError
- type LoginResponseValidationError
- func (e LoginResponseValidationError) Cause() error
- func (e LoginResponseValidationError) Error() string
- func (e LoginResponseValidationError) ErrorName() string
- func (e LoginResponseValidationError) Field() string
- func (e LoginResponseValidationError) Key() bool
- func (e LoginResponseValidationError) Reason() string
- type LogoutRequest
- func (*LogoutRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LogoutRequest) GetId() uint32
- func (*LogoutRequest) ProtoMessage()
- func (x *LogoutRequest) ProtoReflect() protoreflect.Message
- func (x *LogoutRequest) Reset()
- func (x *LogoutRequest) String() string
- func (m *LogoutRequest) Validate() error
- func (m *LogoutRequest) ValidateAll() error
- type LogoutRequestMultiError
- type LogoutRequestValidationError
- func (e LogoutRequestValidationError) Cause() error
- func (e LogoutRequestValidationError) Error() string
- func (e LogoutRequestValidationError) ErrorName() string
- func (e LogoutRequestValidationError) Field() string
- func (e LogoutRequestValidationError) Key() bool
- func (e LogoutRequestValidationError) Reason() string
- type RefreshTokenRequest
- func (*RefreshTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RefreshTokenRequest) GetClientId() string
- func (x *RefreshTokenRequest) GetClientSecret() string
- func (x *RefreshTokenRequest) GetGrantType() string
- func (x *RefreshTokenRequest) GetRefreshToken() string
- func (x *RefreshTokenRequest) GetScope() string
- func (*RefreshTokenRequest) ProtoMessage()
- func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message
- func (x *RefreshTokenRequest) Reset()
- func (x *RefreshTokenRequest) String() string
- func (m *RefreshTokenRequest) Validate() error
- func (m *RefreshTokenRequest) ValidateAll() error
- type RefreshTokenRequestMultiError
- type RefreshTokenRequestValidationError
- func (e RefreshTokenRequestValidationError) Cause() error
- func (e RefreshTokenRequestValidationError) Error() string
- func (e RefreshTokenRequestValidationError) ErrorName() string
- func (e RefreshTokenRequestValidationError) Field() string
- func (e RefreshTokenRequestValidationError) Key() bool
- func (e RefreshTokenRequestValidationError) Reason() string
- type RefreshTokenResponse
- func (*RefreshTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RefreshTokenResponse) GetGrantType() string
- func (x *RefreshTokenResponse) GetRefreshToken() string
- func (*RefreshTokenResponse) ProtoMessage()
- func (x *RefreshTokenResponse) ProtoReflect() protoreflect.Message
- func (x *RefreshTokenResponse) Reset()
- func (x *RefreshTokenResponse) String() string
- func (m *RefreshTokenResponse) Validate() error
- func (m *RefreshTokenResponse) ValidateAll() error
- type RefreshTokenResponseMultiError
- type RefreshTokenResponseValidationError
- func (e RefreshTokenResponseValidationError) Cause() error
- func (e RefreshTokenResponseValidationError) Error() string
- func (e RefreshTokenResponseValidationError) ErrorName() string
- func (e RefreshTokenResponseValidationError) Field() string
- func (e RefreshTokenResponseValidationError) Key() bool
- func (e RefreshTokenResponseValidationError) Reason() string
- type TokenType
- type UnimplementedAuthenticationServiceServer
- func (UnimplementedAuthenticationServiceServer) GetMe(context.Context, *GetMeRequest) (*v1.User, error)
- func (UnimplementedAuthenticationServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
- func (UnimplementedAuthenticationServiceServer) Logout(context.Context, *LogoutRequest) (*emptypb.Empty, error)
- type UnsafeAuthenticationServiceServer
Constants ¶
const ( AuthenticationService_Login_FullMethodName = "/client.v1.AuthenticationService/Login" AuthenticationService_Logout_FullMethodName = "/client.v1.AuthenticationService/Logout" AuthenticationService_GetMe_FullMethodName = "/client.v1.AuthenticationService/GetMe" )
const OperationAuthenticationServiceGetMe = "/client.v1.AuthenticationService/GetMe"
const OperationAuthenticationServiceLogin = "/client.v1.AuthenticationService/Login"
const OperationAuthenticationServiceLogout = "/client.v1.AuthenticationService/Logout"
Variables ¶
var ( GrantType_name = map[int32]string{ 0: "password", 1: "client_credentials", 2: "refresh_token", } GrantType_value = map[string]int32{ "password": 0, "client_credentials": 1, "refresh_token": 2, } )
Enum value maps for GrantType.
var ( TokenType_name = map[int32]string{ 0: "bearer", 1: "mac", } TokenType_value = map[string]int32{ "bearer": 0, "mac": 1, } )
Enum value maps for TokenType.
var ( ClientErrorReason_name = map[int32]string{ 0: "BAD_REQUEST", 1: "NOT_LOGGED_IN", 2: "ACCESS_FORBIDDEN", 3: "RESOURCE_NOT_FOUND", 4: "METHOD_NOT_ALLOWED", 5: "REQUEST_TIMEOUT", 10: "INTERNAL_SERVER_ERROR", 11: "NOT_IMPLEMENTED", 12: "NETWORK_ERROR", 13: "SERVICE_UNAVAILABLE", 14: "NETWORK_TIMEOUT", 15: "REQUEST_NOT_SUPPORT", 20: "INVALID_USERID", 21: "INVALID_PASSWORD", 22: "TOKEN_EXPIRED", 23: "INVALID_TOKEN", 24: "TOKEN_NOT_EXIST", 25: "USER_NOT_EXIST", 26: "USER_FREEZE", } ClientErrorReason_value = map[string]int32{ "BAD_REQUEST": 0, "NOT_LOGGED_IN": 1, "ACCESS_FORBIDDEN": 2, "RESOURCE_NOT_FOUND": 3, "METHOD_NOT_ALLOWED": 4, "REQUEST_TIMEOUT": 5, "INTERNAL_SERVER_ERROR": 10, "NOT_IMPLEMENTED": 11, "NETWORK_ERROR": 12, "SERVICE_UNAVAILABLE": 13, "NETWORK_TIMEOUT": 14, "REQUEST_NOT_SUPPORT": 15, "INVALID_USERID": 20, "INVALID_PASSWORD": 21, "TOKEN_EXPIRED": 22, "INVALID_TOKEN": 23, "TOKEN_NOT_EXIST": 24, "USER_NOT_EXIST": 25, "USER_FREEZE": 26, } )
Enum value maps for ClientErrorReason.
var AuthenticationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "client.v1.AuthenticationService", HandlerType: (*AuthenticationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _AuthenticationService_Login_Handler, }, { MethodName: "Logout", Handler: _AuthenticationService_Logout_Handler, }, { MethodName: "GetMe", Handler: _AuthenticationService_GetMe_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "client/v1/authentication.proto", }
AuthenticationService_ServiceDesc is the grpc.ServiceDesc for AuthenticationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_client_v1_authentication_proto protoreflect.FileDescriptor
var File_client_v1_error_proto protoreflect.FileDescriptor
Functions ¶
func ErrorAccessForbidden ¶
403
func ErrorInternalServerError ¶
500
func ErrorInvalidPassword ¶
密码无效
func ErrorInvalidToken ¶
token无效
func ErrorInvalidUserid ¶
用户ID无效
func ErrorMethodNotAllowed ¶
405
func ErrorNetworkError ¶
502
func ErrorNetworkTimeout ¶
504
func ErrorNotImplemented ¶
501
func ErrorRequestNotSupport ¶
505
func ErrorRequestTimeout ¶
408
func ErrorResourceNotFound ¶
404
func ErrorServiceUnavailable ¶
503
func ErrorTokenExpired ¶
token过期
func ErrorTokenNotExist ¶
token不存在
func ErrorUserNotExist ¶
用户不存在
func RegisterAuthenticationServiceHTTPServer ¶
func RegisterAuthenticationServiceHTTPServer(s *http.Server, srv AuthenticationServiceHTTPServer)
func RegisterAuthenticationServiceServer ¶
func RegisterAuthenticationServiceServer(s grpc.ServiceRegistrar, srv AuthenticationServiceServer)
Types ¶
type AuthenticationServiceClient ¶
type AuthenticationServiceClient interface { // APP Login Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) // APP Logout Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // APP Get the data of logged in user GetMe(ctx context.Context, in *GetMeRequest, opts ...grpc.CallOption) (*v1.User, error) }
AuthenticationServiceClient is the client API for AuthenticationService 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.
The authentication service definition for user APP.
func NewAuthenticationServiceClient ¶
func NewAuthenticationServiceClient(cc grpc.ClientConnInterface) AuthenticationServiceClient
type AuthenticationServiceHTTPClient ¶
type AuthenticationServiceHTTPClient interface { GetMe(ctx context.Context, req *GetMeRequest, opts ...http.CallOption) (rsp *v1.User, err error) Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginResponse, err error) Logout(ctx context.Context, req *LogoutRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error) }
func NewAuthenticationServiceHTTPClient ¶
func NewAuthenticationServiceHTTPClient(client *http.Client) AuthenticationServiceHTTPClient
type AuthenticationServiceHTTPClientImpl ¶
type AuthenticationServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*AuthenticationServiceHTTPClientImpl) GetMe ¶
func (c *AuthenticationServiceHTTPClientImpl) GetMe(ctx context.Context, in *GetMeRequest, opts ...http.CallOption) (*v1.User, error)
func (*AuthenticationServiceHTTPClientImpl) Login ¶
func (c *AuthenticationServiceHTTPClientImpl) Login(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginResponse, error)
func (*AuthenticationServiceHTTPClientImpl) Logout ¶
func (c *AuthenticationServiceHTTPClientImpl) Logout(ctx context.Context, in *LogoutRequest, opts ...http.CallOption) (*emptypb.Empty, error)
type AuthenticationServiceHTTPServer ¶
type AuthenticationServiceHTTPServer interface { // GetMe APP Get the data of logged in user GetMe(context.Context, *GetMeRequest) (*v1.User, error) // Login APP Login Login(context.Context, *LoginRequest) (*LoginResponse, error) // Logout APP Logout Logout(context.Context, *LogoutRequest) (*emptypb.Empty, error) }
type AuthenticationServiceServer ¶
type AuthenticationServiceServer interface { // APP Login Login(context.Context, *LoginRequest) (*LoginResponse, error) // APP Logout Logout(context.Context, *LogoutRequest) (*emptypb.Empty, error) // APP Get the data of logged in user GetMe(context.Context, *GetMeRequest) (*v1.User, error) // contains filtered or unexported methods }
AuthenticationServiceServer is the server API for AuthenticationService service. All implementations must embed UnimplementedAuthenticationServiceServer for forward compatibility
The authentication service definition for user APP.
type ClientErrorReason ¶
type ClientErrorReason int32
const ( ClientErrorReason_BAD_REQUEST ClientErrorReason = 0 // 400 ClientErrorReason_NOT_LOGGED_IN ClientErrorReason = 1 // 401 ClientErrorReason_ACCESS_FORBIDDEN ClientErrorReason = 2 // 403 ClientErrorReason_RESOURCE_NOT_FOUND ClientErrorReason = 3 // 404 ClientErrorReason_METHOD_NOT_ALLOWED ClientErrorReason = 4 // 405 ClientErrorReason_REQUEST_TIMEOUT ClientErrorReason = 5 // 408 ClientErrorReason_INTERNAL_SERVER_ERROR ClientErrorReason = 10 // 500 ClientErrorReason_NOT_IMPLEMENTED ClientErrorReason = 11 // 501 ClientErrorReason_NETWORK_ERROR ClientErrorReason = 12 // 502 ClientErrorReason_SERVICE_UNAVAILABLE ClientErrorReason = 13 // 503 ClientErrorReason_NETWORK_TIMEOUT ClientErrorReason = 14 // 504 ClientErrorReason_REQUEST_NOT_SUPPORT ClientErrorReason = 15 // 505 ClientErrorReason_INVALID_USERID ClientErrorReason = 20 // 用户ID无效 ClientErrorReason_INVALID_PASSWORD ClientErrorReason = 21 // 密码无效 ClientErrorReason_TOKEN_EXPIRED ClientErrorReason = 22 // token过期 ClientErrorReason_INVALID_TOKEN ClientErrorReason = 23 // token无效 ClientErrorReason_TOKEN_NOT_EXIST ClientErrorReason = 24 // token不存在 ClientErrorReason_USER_NOT_EXIST ClientErrorReason = 25 // 用户不存在 ClientErrorReason_USER_FREEZE ClientErrorReason = 26 // 账号冻结 )
func (ClientErrorReason) Descriptor ¶
func (ClientErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ClientErrorReason) Enum ¶
func (x ClientErrorReason) Enum() *ClientErrorReason
func (ClientErrorReason) EnumDescriptor
deprecated
func (ClientErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ClientErrorReason.Descriptor instead.
func (ClientErrorReason) Number ¶
func (x ClientErrorReason) Number() protoreflect.EnumNumber
func (ClientErrorReason) String ¶
func (x ClientErrorReason) String() string
func (ClientErrorReason) Type ¶
func (ClientErrorReason) Type() protoreflect.EnumType
type GetMeRequest ¶
type GetMeRequest struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Get current user information - request
func (*GetMeRequest) Descriptor
deprecated
func (*GetMeRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMeRequest.ProtoReflect.Descriptor instead.
func (*GetMeRequest) GetId ¶
func (x *GetMeRequest) GetId() uint32
func (*GetMeRequest) ProtoMessage ¶
func (*GetMeRequest) ProtoMessage()
func (*GetMeRequest) ProtoReflect ¶
func (x *GetMeRequest) ProtoReflect() protoreflect.Message
func (*GetMeRequest) Reset ¶
func (x *GetMeRequest) Reset()
func (*GetMeRequest) String ¶
func (x *GetMeRequest) String() string
func (*GetMeRequest) Validate ¶
func (m *GetMeRequest) Validate() error
Validate checks the field values on GetMeRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetMeRequest) ValidateAll ¶
func (m *GetMeRequest) ValidateAll() error
ValidateAll checks the field values on GetMeRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetMeRequestMultiError, or nil if none found.
type GetMeRequestMultiError ¶
type GetMeRequestMultiError []error
GetMeRequestMultiError is an error wrapping multiple validation errors returned by GetMeRequest.ValidateAll() if the designated constraints aren't met.
func (GetMeRequestMultiError) AllErrors ¶
func (m GetMeRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetMeRequestMultiError) Error ¶
func (m GetMeRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetMeRequestValidationError ¶
type GetMeRequestValidationError struct {
// contains filtered or unexported fields
}
GetMeRequestValidationError is the validation error returned by GetMeRequest.Validate if the designated constraints aren't met.
func (GetMeRequestValidationError) Cause ¶
func (e GetMeRequestValidationError) Cause() error
Cause function returns cause value.
func (GetMeRequestValidationError) Error ¶
func (e GetMeRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetMeRequestValidationError) ErrorName ¶
func (e GetMeRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetMeRequestValidationError) Field ¶
func (e GetMeRequestValidationError) Field() string
Field function returns field value.
func (GetMeRequestValidationError) Key ¶
func (e GetMeRequestValidationError) Key() bool
Key function returns key value.
func (GetMeRequestValidationError) Reason ¶
func (e GetMeRequestValidationError) Reason() string
Reason function returns reason value.
type GrantType ¶
type GrantType int32
Authorization type
func (GrantType) Descriptor ¶
func (GrantType) Descriptor() protoreflect.EnumDescriptor
func (GrantType) EnumDescriptor
deprecated
func (GrantType) Number ¶
func (x GrantType) Number() protoreflect.EnumNumber
func (GrantType) Type ¶
func (GrantType) Type() protoreflect.EnumType
type LoginRequest ¶
type LoginRequest struct { UserName string `protobuf:"bytes,1,opt,name=user_name,proto3" json:"user_name,omitempty"` // Username, required. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // User's password, required. GrantType string `protobuf:"bytes,3,opt,name=grant_type,proto3" json:"grant_type,omitempty"` // Authorization type, the value here is fixed to "password", required. Scope *string `protobuf:"bytes,4,opt,name=scope,proto3,oneof" json:"scope,omitempty"` // A space-separated list of ranges. If not provided, scope authorizes any scope, defaulting to an empty list. ClientId *string `protobuf:"bytes,5,opt,name=client_id,proto3,oneof" json:"client_id,omitempty"` ClientSecret *string `protobuf:"bytes,6,opt,name=client_secret,proto3,oneof" json:"client_secret,omitempty"` // contains filtered or unexported fields }
User background login - request
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetClientId ¶
func (x *LoginRequest) GetClientId() string
func (*LoginRequest) GetClientSecret ¶
func (x *LoginRequest) GetClientSecret() string
func (*LoginRequest) GetGrantType ¶
func (x *LoginRequest) GetGrantType() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) GetScope ¶
func (x *LoginRequest) GetScope() string
func (*LoginRequest) GetUserName ¶
func (x *LoginRequest) GetUserName() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
func (*LoginRequest) Validate ¶
func (m *LoginRequest) Validate() error
Validate checks the field values on LoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*LoginRequest) ValidateAll ¶
func (m *LoginRequest) ValidateAll() error
ValidateAll checks the field values on LoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LoginRequestMultiError, or nil if none found.
type LoginRequestMultiError ¶
type LoginRequestMultiError []error
LoginRequestMultiError is an error wrapping multiple validation errors returned by LoginRequest.ValidateAll() if the designated constraints aren't met.
func (LoginRequestMultiError) AllErrors ¶
func (m LoginRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LoginRequestMultiError) Error ¶
func (m LoginRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LoginRequestValidationError ¶
type LoginRequestValidationError struct {
// contains filtered or unexported fields
}
LoginRequestValidationError is the validation error returned by LoginRequest.Validate if the designated constraints aren't met.
func (LoginRequestValidationError) Cause ¶
func (e LoginRequestValidationError) Cause() error
Cause function returns cause value.
func (LoginRequestValidationError) Error ¶
func (e LoginRequestValidationError) Error() string
Error satisfies the builtin error interface
func (LoginRequestValidationError) ErrorName ¶
func (e LoginRequestValidationError) ErrorName() string
ErrorName returns error name.
func (LoginRequestValidationError) Field ¶
func (e LoginRequestValidationError) Field() string
Field function returns field value.
func (LoginRequestValidationError) Key ¶
func (e LoginRequestValidationError) Key() bool
Key function returns key value.
func (LoginRequestValidationError) Reason ¶
func (e LoginRequestValidationError) Reason() string
Reason function returns reason value.
type LoginResponse ¶
type LoginResponse struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,proto3" json:"access_token,omitempty"` // Access token, required. RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,proto3" json:"refresh_token,omitempty"` // Refresh token, used to obtain the next access token, optional. TokenType string `protobuf:"bytes,3,opt,name=token_type,proto3" json:"token_type,omitempty"` // Token type, this value is case-insensitive, required, and can be bearer type or mac type. ExpiresIn *int64 `protobuf:"varint,4,opt,name=expires_in,proto3,oneof" json:"expires_in,omitempty"` // Token validity time, unit is seconds. If the access token expires, the server should reply with the duration of the access token granted. If this parameter is omitted, the expiration time must be set in other ways. Scope *string `protobuf:"bytes,5,opt,name=scope,proto3,oneof" json:"scope,omitempty"` // A space-separated list of user grant scopes. If not provided, scope authorizes any scope, defaulting to an empty list. // contains filtered or unexported fields }
User background login - response
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetAccessToken ¶
func (x *LoginResponse) GetAccessToken() string
func (*LoginResponse) GetExpiresIn ¶
func (x *LoginResponse) GetExpiresIn() int64
func (*LoginResponse) GetRefreshToken ¶
func (x *LoginResponse) GetRefreshToken() string
func (*LoginResponse) GetScope ¶
func (x *LoginResponse) GetScope() string
func (*LoginResponse) GetTokenType ¶
func (x *LoginResponse) GetTokenType() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
func (*LoginResponse) Validate ¶
func (m *LoginResponse) Validate() error
Validate checks the field values on LoginResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*LoginResponse) ValidateAll ¶
func (m *LoginResponse) ValidateAll() error
ValidateAll checks the field values on LoginResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LoginResponseMultiError, or nil if none found.
type LoginResponseMultiError ¶
type LoginResponseMultiError []error
LoginResponseMultiError is an error wrapping multiple validation errors returned by LoginResponse.ValidateAll() if the designated constraints aren't met.
func (LoginResponseMultiError) AllErrors ¶
func (m LoginResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LoginResponseMultiError) Error ¶
func (m LoginResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LoginResponseValidationError ¶
type LoginResponseValidationError struct {
// contains filtered or unexported fields
}
LoginResponseValidationError is the validation error returned by LoginResponse.Validate if the designated constraints aren't met.
func (LoginResponseValidationError) Cause ¶
func (e LoginResponseValidationError) Cause() error
Cause function returns cause value.
func (LoginResponseValidationError) Error ¶
func (e LoginResponseValidationError) Error() string
Error satisfies the builtin error interface
func (LoginResponseValidationError) ErrorName ¶
func (e LoginResponseValidationError) ErrorName() string
ErrorName returns error name.
func (LoginResponseValidationError) Field ¶
func (e LoginResponseValidationError) Field() string
Field function returns field value.
func (LoginResponseValidationError) Key ¶
func (e LoginResponseValidationError) Key() bool
Key function returns key value.
func (LoginResponseValidationError) Reason ¶
func (e LoginResponseValidationError) Reason() string
Reason function returns reason value.
type LogoutRequest ¶
type LogoutRequest struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
User background logout - request
func (*LogoutRequest) Descriptor
deprecated
func (*LogoutRequest) Descriptor() ([]byte, []int)
Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.
func (*LogoutRequest) GetId ¶
func (x *LogoutRequest) GetId() uint32
func (*LogoutRequest) ProtoMessage ¶
func (*LogoutRequest) ProtoMessage()
func (*LogoutRequest) ProtoReflect ¶
func (x *LogoutRequest) ProtoReflect() protoreflect.Message
func (*LogoutRequest) Reset ¶
func (x *LogoutRequest) Reset()
func (*LogoutRequest) String ¶
func (x *LogoutRequest) String() string
func (*LogoutRequest) Validate ¶
func (m *LogoutRequest) Validate() error
Validate checks the field values on LogoutRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*LogoutRequest) ValidateAll ¶
func (m *LogoutRequest) ValidateAll() error
ValidateAll checks the field values on LogoutRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LogoutRequestMultiError, or nil if none found.
type LogoutRequestMultiError ¶
type LogoutRequestMultiError []error
LogoutRequestMultiError is an error wrapping multiple validation errors returned by LogoutRequest.ValidateAll() if the designated constraints aren't met.
func (LogoutRequestMultiError) AllErrors ¶
func (m LogoutRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LogoutRequestMultiError) Error ¶
func (m LogoutRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LogoutRequestValidationError ¶
type LogoutRequestValidationError struct {
// contains filtered or unexported fields
}
LogoutRequestValidationError is the validation error returned by LogoutRequest.Validate if the designated constraints aren't met.
func (LogoutRequestValidationError) Cause ¶
func (e LogoutRequestValidationError) Cause() error
Cause function returns cause value.
func (LogoutRequestValidationError) Error ¶
func (e LogoutRequestValidationError) Error() string
Error satisfies the builtin error interface
func (LogoutRequestValidationError) ErrorName ¶
func (e LogoutRequestValidationError) ErrorName() string
ErrorName returns error name.
func (LogoutRequestValidationError) Field ¶
func (e LogoutRequestValidationError) Field() string
Field function returns field value.
func (LogoutRequestValidationError) Key ¶
func (e LogoutRequestValidationError) Key() bool
Key function returns key value.
func (LogoutRequestValidationError) Reason ¶
func (e LogoutRequestValidationError) Reason() string
Reason function returns reason value.
type RefreshTokenRequest ¶
type RefreshTokenRequest struct { RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,proto3" json:"refresh_token,omitempty"` // Refresh token, used to obtain the next access token, required. GrantType string `protobuf:"bytes,2,opt,name=grant_type,proto3" json:"grant_type,omitempty"` // Authorization type, the value here is fixed to "refresh_token", required. Scope *string `protobuf:"bytes,3,opt,name=scope,proto3,oneof" json:"scope,omitempty"` // A space-separated list of ranges. If not provided, scope authorizes any scope, defaulting to an empty list. ClientId *string `protobuf:"bytes,5,opt,name=client_id,proto3,oneof" json:"client_id,omitempty"` ClientSecret *string `protobuf:"bytes,6,opt,name=client_secret,proto3,oneof" json:"client_secret,omitempty"` // contains filtered or unexported fields }
User refresh token - request
func (*RefreshTokenRequest) Descriptor
deprecated
func (*RefreshTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.
func (*RefreshTokenRequest) GetClientId ¶
func (x *RefreshTokenRequest) GetClientId() string
func (*RefreshTokenRequest) GetClientSecret ¶
func (x *RefreshTokenRequest) GetClientSecret() string
func (*RefreshTokenRequest) GetGrantType ¶
func (x *RefreshTokenRequest) GetGrantType() string
func (*RefreshTokenRequest) GetRefreshToken ¶
func (x *RefreshTokenRequest) GetRefreshToken() string
func (*RefreshTokenRequest) GetScope ¶
func (x *RefreshTokenRequest) GetScope() string
func (*RefreshTokenRequest) ProtoMessage ¶
func (*RefreshTokenRequest) ProtoMessage()
func (*RefreshTokenRequest) ProtoReflect ¶
func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message
func (*RefreshTokenRequest) Reset ¶
func (x *RefreshTokenRequest) Reset()
func (*RefreshTokenRequest) String ¶
func (x *RefreshTokenRequest) String() string
func (*RefreshTokenRequest) Validate ¶
func (m *RefreshTokenRequest) Validate() error
Validate checks the field values on RefreshTokenRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*RefreshTokenRequest) ValidateAll ¶
func (m *RefreshTokenRequest) ValidateAll() error
ValidateAll checks the field values on RefreshTokenRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RefreshTokenRequestMultiError, or nil if none found.
type RefreshTokenRequestMultiError ¶
type RefreshTokenRequestMultiError []error
RefreshTokenRequestMultiError is an error wrapping multiple validation errors returned by RefreshTokenRequest.ValidateAll() if the designated constraints aren't met.
func (RefreshTokenRequestMultiError) AllErrors ¶
func (m RefreshTokenRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RefreshTokenRequestMultiError) Error ¶
func (m RefreshTokenRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RefreshTokenRequestValidationError ¶
type RefreshTokenRequestValidationError struct {
// contains filtered or unexported fields
}
RefreshTokenRequestValidationError is the validation error returned by RefreshTokenRequest.Validate if the designated constraints aren't met.
func (RefreshTokenRequestValidationError) Cause ¶
func (e RefreshTokenRequestValidationError) Cause() error
Cause function returns cause value.
func (RefreshTokenRequestValidationError) Error ¶
func (e RefreshTokenRequestValidationError) Error() string
Error satisfies the builtin error interface
func (RefreshTokenRequestValidationError) ErrorName ¶
func (e RefreshTokenRequestValidationError) ErrorName() string
ErrorName returns error name.
func (RefreshTokenRequestValidationError) Field ¶
func (e RefreshTokenRequestValidationError) Field() string
Field function returns field value.
func (RefreshTokenRequestValidationError) Key ¶
func (e RefreshTokenRequestValidationError) Key() bool
Key function returns key value.
func (RefreshTokenRequestValidationError) Reason ¶
func (e RefreshTokenRequestValidationError) Reason() string
Reason function returns reason value.
type RefreshTokenResponse ¶
type RefreshTokenResponse struct { RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,proto3" json:"refresh_token,omitempty"` // Refresh token, used to obtain the next access token, optional. GrantType string `protobuf:"bytes,2,opt,name=grant_type,proto3" json:"grant_type,omitempty"` // Authorization type, the value here is fixed to "refresh token", required. // contains filtered or unexported fields }
User refresh token - response
func (*RefreshTokenResponse) Descriptor
deprecated
func (*RefreshTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use RefreshTokenResponse.ProtoReflect.Descriptor instead.
func (*RefreshTokenResponse) GetGrantType ¶
func (x *RefreshTokenResponse) GetGrantType() string
func (*RefreshTokenResponse) GetRefreshToken ¶
func (x *RefreshTokenResponse) GetRefreshToken() string
func (*RefreshTokenResponse) ProtoMessage ¶
func (*RefreshTokenResponse) ProtoMessage()
func (*RefreshTokenResponse) ProtoReflect ¶
func (x *RefreshTokenResponse) ProtoReflect() protoreflect.Message
func (*RefreshTokenResponse) Reset ¶
func (x *RefreshTokenResponse) Reset()
func (*RefreshTokenResponse) String ¶
func (x *RefreshTokenResponse) String() string
func (*RefreshTokenResponse) Validate ¶
func (m *RefreshTokenResponse) Validate() error
Validate checks the field values on RefreshTokenResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*RefreshTokenResponse) ValidateAll ¶
func (m *RefreshTokenResponse) ValidateAll() error
ValidateAll checks the field values on RefreshTokenResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RefreshTokenResponseMultiError, or nil if none found.
type RefreshTokenResponseMultiError ¶
type RefreshTokenResponseMultiError []error
RefreshTokenResponseMultiError is an error wrapping multiple validation errors returned by RefreshTokenResponse.ValidateAll() if the designated constraints aren't met.
func (RefreshTokenResponseMultiError) AllErrors ¶
func (m RefreshTokenResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RefreshTokenResponseMultiError) Error ¶
func (m RefreshTokenResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RefreshTokenResponseValidationError ¶
type RefreshTokenResponseValidationError struct {
// contains filtered or unexported fields
}
RefreshTokenResponseValidationError is the validation error returned by RefreshTokenResponse.Validate if the designated constraints aren't met.
func (RefreshTokenResponseValidationError) Cause ¶
func (e RefreshTokenResponseValidationError) Cause() error
Cause function returns cause value.
func (RefreshTokenResponseValidationError) Error ¶
func (e RefreshTokenResponseValidationError) Error() string
Error satisfies the builtin error interface
func (RefreshTokenResponseValidationError) ErrorName ¶
func (e RefreshTokenResponseValidationError) ErrorName() string
ErrorName returns error name.
func (RefreshTokenResponseValidationError) Field ¶
func (e RefreshTokenResponseValidationError) Field() string
Field function returns field value.
func (RefreshTokenResponseValidationError) Key ¶
func (e RefreshTokenResponseValidationError) Key() bool
Key function returns key value.
func (RefreshTokenResponseValidationError) Reason ¶
func (e RefreshTokenResponseValidationError) Reason() string
Reason function returns reason value.
type TokenType ¶
type TokenType int32
Token type
func (TokenType) Descriptor ¶
func (TokenType) Descriptor() protoreflect.EnumDescriptor
func (TokenType) EnumDescriptor
deprecated
func (TokenType) Number ¶
func (x TokenType) Number() protoreflect.EnumNumber
func (TokenType) Type ¶
func (TokenType) Type() protoreflect.EnumType
type UnimplementedAuthenticationServiceServer ¶
type UnimplementedAuthenticationServiceServer struct { }
UnimplementedAuthenticationServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthenticationServiceServer) GetMe ¶
func (UnimplementedAuthenticationServiceServer) GetMe(context.Context, *GetMeRequest) (*v1.User, error)
func (UnimplementedAuthenticationServiceServer) Login ¶
func (UnimplementedAuthenticationServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (UnimplementedAuthenticationServiceServer) Logout ¶
func (UnimplementedAuthenticationServiceServer) Logout(context.Context, *LogoutRequest) (*emptypb.Empty, error)
type UnsafeAuthenticationServiceServer ¶
type UnsafeAuthenticationServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthenticationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthenticationServiceServer will result in compilation errors.