authentication

package
v0.0.0-...-00900f5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SSOType_name = map[int32]string{
		0: "SSO_TYPE_UNSPECIFIED",
		1: "SSO_TYPE_OIDC",
	}
	SSOType_value = map[string]int32{
		"SSO_TYPE_UNSPECIFIED": 0,
		"SSO_TYPE_OIDC":        1,
	}
)

Enum value maps for SSOType.

View Source
var File_api_v1_authentication_service_proto protoreflect.FileDescriptor
View Source
var File_api_v1_authentication_user_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1.authentication.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Service_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _Service_Logout_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Service_Get_Handler,
		},
		{
			MethodName: "Register",
			Handler:    _Service_Register_Handler,
		},
		{
			MethodName: "SendPasswordReset",
			Handler:    _Service_SendPasswordReset_Handler,
		},
		{
			MethodName: "ResetPassword",
			Handler:    _Service_ResetPassword_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Service_Delete_Handler,
		},
		{
			MethodName: "RefreshToken",
			Handler:    _Service_RefreshToken_Handler,
		},
		{
			MethodName: "GetAuthConfig",
			Handler:    _Service_GetAuthConfig_Handler,
		},
		{
			MethodName: "VerifyEmail",
			Handler:    _Service_VerifyEmail_Handler,
		},
		{
			MethodName: "VerifyPhoneNumber",
			Handler:    _Service_VerifyPhoneNumber_Handler,
		},
		{
			MethodName: "SendVerificationEmail",
			Handler:    _Service_SendVerificationEmail_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/authentication/service.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type ClientCredentials

type ClientCredentials struct {

	// ID of the service account
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// secret of the service account
	ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientCredentials) Descriptor deprecated

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

Deprecated: Use ClientCredentials.ProtoReflect.Descriptor instead.

func (*ClientCredentials) GetClientId

func (x *ClientCredentials) GetClientId() string

func (*ClientCredentials) GetClientSecret

func (x *ClientCredentials) GetClientSecret() string

func (*ClientCredentials) ProtoMessage

func (*ClientCredentials) ProtoMessage()

func (*ClientCredentials) ProtoReflect

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

func (*ClientCredentials) Reset

func (x *ClientCredentials) Reset()

func (*ClientCredentials) String

func (x *ClientCredentials) String() string

type DeleteRequest

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

Request to delete the logged in user. The user ID etc. is taken from the token.

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

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

Empty response to the delete request.

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type GetAuthConfigRequest

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

Empty Request to get the auth config containing the available login mechanisms and if self-registering is enabled.

func (*GetAuthConfigRequest) Descriptor deprecated

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

Deprecated: Use GetAuthConfigRequest.ProtoReflect.Descriptor instead.

func (*GetAuthConfigRequest) ProtoMessage

func (*GetAuthConfigRequest) ProtoMessage()

func (*GetAuthConfigRequest) ProtoReflect

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

func (*GetAuthConfigRequest) Reset

func (x *GetAuthConfigRequest) Reset()

func (*GetAuthConfigRequest) String

func (x *GetAuthConfigRequest) String() string

type GetAuthConfigResponse

type GetAuthConfigResponse struct {

	// The name of the project
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The logo of the project
	LogoUrl string `protobuf:"bytes,2,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"`
	// If to validate password
	ValidatePassword bool `protobuf:"varint,3,opt,name=validate_password,json=validatePassword,proto3" json:"validate_password,omitempty"`
	// Array of supported login methods.
	LoginTypes []model.LoginType `protobuf:"varint,4,rep,packed,name=login_types,json=loginTypes,proto3,enum=model.LoginType" json:"login_types,omitempty"`
	// True if new users can sign up.
	AllowsRegister bool `protobuf:"varint,7,opt,name=allows_register,json=allowsRegister,proto3" json:"allows_register,omitempty"`
	// SSO login options
	SsoOptions []*SSOOption `protobuf:"bytes,8,rep,name=sso_options,json=ssoOptions,proto3" json:"sso_options,omitempty"`
	// contains filtered or unexported fields
}

Response with the auth config containing the available login mechanisms and if self-registering is enabled.

func (*GetAuthConfigResponse) Descriptor deprecated

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

Deprecated: Use GetAuthConfigResponse.ProtoReflect.Descriptor instead.

func (*GetAuthConfigResponse) GetAllowsRegister

func (x *GetAuthConfigResponse) GetAllowsRegister() bool

func (*GetAuthConfigResponse) GetLoginTypes

func (x *GetAuthConfigResponse) GetLoginTypes() []model.LoginType

func (*GetAuthConfigResponse) GetLogoUrl

func (x *GetAuthConfigResponse) GetLogoUrl() string

func (*GetAuthConfigResponse) GetName

func (x *GetAuthConfigResponse) GetName() string

func (*GetAuthConfigResponse) GetSsoOptions

func (x *GetAuthConfigResponse) GetSsoOptions() []*SSOOption

func (*GetAuthConfigResponse) GetValidatePassword

func (x *GetAuthConfigResponse) GetValidatePassword() bool

func (*GetAuthConfigResponse) ProtoMessage

func (*GetAuthConfigResponse) ProtoMessage()

func (*GetAuthConfigResponse) ProtoReflect

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

func (*GetAuthConfigResponse) Reset

func (x *GetAuthConfigResponse) Reset()

func (*GetAuthConfigResponse) String

func (x *GetAuthConfigResponse) String() string

type GetRequest

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

Get request to get the logged in user. The user ID etc. is taken from the token.

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {

	// Information about the user.
	UserInfo *model.UserInfo `protobuf:"bytes,1,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	// ID of the user
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

Response with user information to the get request.

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetUserId

func (x *GetResponse) GetUserId() string

func (*GetResponse) GetUserInfo

func (x *GetResponse) GetUserInfo() *model.UserInfo

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type LoginRequest

type LoginRequest struct {

	// Types that are assignable to Method:
	//
	//	*LoginRequest_UserPassword
	//	*LoginRequest_ClientCredentials
	Method isLoginRequest_Method `protobuf_oneof:"method"`
	// contains filtered or unexported fields
}

Login request with either user identifier & email or client credentials.

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetClientCredentials

func (x *LoginRequest) GetClientCredentials() *ClientCredentials

func (*LoginRequest) GetMethod

func (m *LoginRequest) GetMethod() isLoginRequest_Method

func (*LoginRequest) GetUserPassword

func (x *LoginRequest) GetUserPassword() *UserPassword

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

type LoginRequest_ClientCredentials

type LoginRequest_ClientCredentials struct {
	// Client credentials from service account.
	ClientCredentials *ClientCredentials `protobuf:"bytes,3,opt,name=client_credentials,json=clientCredentials,proto3,oneof"`
}

type LoginRequest_UserPassword

type LoginRequest_UserPassword struct {
	// User identifier & password.
	UserPassword *UserPassword `protobuf:"bytes,1,opt,name=user_password,json=userPassword,proto3,oneof"`
}

type LoginResponse

type LoginResponse struct {

	// The access token and refresh token.
	Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// ID of the user.
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// User information.
	UserInfo *model.UserInfo `protobuf:"bytes,3,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	// contains filtered or unexported fields
}

Login response with tokens and user information.

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetToken

func (x *LoginResponse) GetToken() *Token

func (*LoginResponse) GetUserId

func (x *LoginResponse) GetUserId() string

func (*LoginResponse) GetUserInfo

func (x *LoginResponse) GetUserInfo() *model.UserInfo

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

type LogoutRequest

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

Empty logout request. The user ID etc. is taken from the token.

func (*LogoutRequest) Descriptor deprecated

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

Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.

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

type LogoutResponse

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

Empty response to the logout request.

func (*LogoutResponse) Descriptor deprecated

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

Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.

func (*LogoutResponse) ProtoMessage

func (*LogoutResponse) ProtoMessage()

func (*LogoutResponse) ProtoReflect

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

func (*LogoutResponse) Reset

func (x *LogoutResponse) Reset()

func (*LogoutResponse) String

func (x *LogoutResponse) String() string

type RefreshTokenRequest

type RefreshTokenRequest struct {

	// The access token of the user
	// Refresh token matching the access token.
	RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

Request to refresh the access and refresh token of the logged in user.

func (*RefreshTokenRequest) Descriptor deprecated

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

Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.

func (*RefreshTokenRequest) GetRefreshToken

func (x *RefreshTokenRequest) GetRefreshToken() 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

type RefreshTokenResponse

type RefreshTokenResponse struct {

	// New refresh and access tokens
	Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

Response with new access and refresh token.

func (*RefreshTokenResponse) Descriptor deprecated

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

Deprecated: Use RefreshTokenResponse.ProtoReflect.Descriptor instead.

func (*RefreshTokenResponse) GetToken

func (x *RefreshTokenResponse) GetToken() *Token

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

type RegisterRequest

type RegisterRequest struct {

	// Types that are assignable to Method:
	//
	//	*RegisterRequest_UserPassword
	Method isRegisterRequest_Method `protobuf_oneof:"method"`
	// contains filtered or unexported fields
}

Register request for users to self-register. This is only possible with the register bool set in users settings.

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetMethod

func (m *RegisterRequest) GetMethod() isRegisterRequest_Method

func (*RegisterRequest) GetUserPassword

func (x *RegisterRequest) GetUserPassword() *UserPassword

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type RegisterRequest_UserPassword

type RegisterRequest_UserPassword struct {
	// User identifier & password for the new user.
	UserPassword *UserPassword `protobuf:"bytes,1,opt,name=user_password,json=userPassword,proto3,oneof"`
}

type RegisterResponse

type RegisterResponse struct {

	// Access and refresh token for the new logged in user.
	Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// User ID of the new user.
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Information about the new user.
	UserInfo *model.UserInfo `protobuf:"bytes,3,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	// contains filtered or unexported fields
}

Register response with tokens and user information.

func (*RegisterResponse) Descriptor deprecated

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

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetToken

func (x *RegisterResponse) GetToken() *Token

func (*RegisterResponse) GetUserId

func (x *RegisterResponse) GetUserId() string

func (*RegisterResponse) GetUserInfo

func (x *RegisterResponse) GetUserInfo() *model.UserInfo

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

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

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

type ResetPasswordRequest

type ResetPasswordRequest struct {

	// The 6 digit verification code
	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// The new password
	NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
	// Identifier of the user
	Identifier *model.UserIdentifier `protobuf:"bytes,3,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// JWT token to reset the password.
	Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

Request to reset the password of a user with a verification code sent to the email.

func (*ResetPasswordRequest) Descriptor deprecated

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

Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead.

func (*ResetPasswordRequest) GetCode

func (x *ResetPasswordRequest) GetCode() string

func (*ResetPasswordRequest) GetIdentifier

func (x *ResetPasswordRequest) GetIdentifier() *model.UserIdentifier

func (*ResetPasswordRequest) GetNewPassword

func (x *ResetPasswordRequest) GetNewPassword() string

func (*ResetPasswordRequest) GetToken

func (x *ResetPasswordRequest) GetToken() string

func (*ResetPasswordRequest) ProtoMessage

func (*ResetPasswordRequest) ProtoMessage()

func (*ResetPasswordRequest) ProtoReflect

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

func (*ResetPasswordRequest) Reset

func (x *ResetPasswordRequest) Reset()

func (*ResetPasswordRequest) String

func (x *ResetPasswordRequest) String() string

type ResetPasswordResponse

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

Empty response to the reset password request

func (*ResetPasswordResponse) Descriptor deprecated

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

Deprecated: Use ResetPasswordResponse.ProtoReflect.Descriptor instead.

func (*ResetPasswordResponse) ProtoMessage

func (*ResetPasswordResponse) ProtoMessage()

func (*ResetPasswordResponse) ProtoReflect

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

func (*ResetPasswordResponse) Reset

func (x *ResetPasswordResponse) Reset()

func (*ResetPasswordResponse) String

func (x *ResetPasswordResponse) String() string

type SSOID

type SSOID struct {

	// What type of SSO this ID is from
	Type SSOType `protobuf:"varint,1,opt,name=type,proto3,enum=api.v1.authentication.SSOType" json:"type,omitempty"`
	// The ID of the SSO provider
	ProviderId string `protobuf:"bytes,2,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"`
	// The ID provided by SSO
	SsoId string `protobuf:"bytes,3,opt,name=sso_id,json=ssoId,proto3" json:"sso_id,omitempty"`
	// The internal user ID
	UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

Represents an SSO provided ID of a user

func (*SSOID) Descriptor deprecated

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

Deprecated: Use SSOID.ProtoReflect.Descriptor instead.

func (*SSOID) GetProviderId

func (x *SSOID) GetProviderId() string

func (*SSOID) GetSsoId

func (x *SSOID) GetSsoId() string

func (*SSOID) GetType

func (x *SSOID) GetType() SSOType

func (*SSOID) GetUserId

func (x *SSOID) GetUserId() string

func (*SSOID) ProtoMessage

func (*SSOID) ProtoMessage()

func (*SSOID) ProtoReflect

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

func (*SSOID) Reset

func (x *SSOID) Reset()

func (*SSOID) String

func (x *SSOID) String() string

type SSOOption

type SSOOption struct {

	// Type of SSO. Currently only OIDC is supported.
	Type SSOType `protobuf:"varint,1,opt,name=type,proto3,enum=api.v1.authentication.SSOType" json:"type,omitempty"`
	// ID of the SSO provider as given in the platform configuration.
	ProviderId string `protobuf:"bytes,2,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"`
	// Name of SSO provider. This is an optional human readable version of the
	// provider ID.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// URL of the underlying issuer. This can be used in the frontend for
	// showing specific items for certain known issuers.
	Icon string `protobuf:"bytes,4,opt,name=icon,proto3" json:"icon,omitempty"`
	// contains filtered or unexported fields
}

A login option for using SSO. This might be merged into GetAuthConfigResponse.login_types, but is introduced as a separate field, to maintain backwards compatibility.

func (*SSOOption) Descriptor deprecated

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

Deprecated: Use SSOOption.ProtoReflect.Descriptor instead.

func (*SSOOption) GetIcon

func (x *SSOOption) GetIcon() string

func (*SSOOption) GetName

func (x *SSOOption) GetName() string

func (*SSOOption) GetProviderId

func (x *SSOOption) GetProviderId() string

func (*SSOOption) GetType

func (x *SSOOption) GetType() SSOType

func (*SSOOption) ProtoMessage

func (*SSOOption) ProtoMessage()

func (*SSOOption) ProtoReflect

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

func (*SSOOption) Reset

func (x *SSOOption) Reset()

func (*SSOOption) String

func (x *SSOOption) String() string

type SSOType

type SSOType int32

The type of SSO. Currently only OIDC is supported.

const (
	SSOType_SSO_TYPE_UNSPECIFIED SSOType = 0
	SSOType_SSO_TYPE_OIDC        SSOType = 1
)

func (SSOType) Descriptor

func (SSOType) Descriptor() protoreflect.EnumDescriptor

func (SSOType) Enum

func (x SSOType) Enum() *SSOType

func (SSOType) EnumDescriptor deprecated

func (SSOType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SSOType.Descriptor instead.

func (SSOType) Number

func (x SSOType) Number() protoreflect.EnumNumber

func (SSOType) String

func (x SSOType) String() string

func (SSOType) Type

func (SSOType) Type() protoreflect.EnumType

type SendPasswordResetRequest

type SendPasswordResetRequest struct {

	// User identifier of the user.
	Identifier *model.UserIdentifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// contains filtered or unexported fields
}

Request to send a reset password email to the user. This is only possible if an email provider is configured, and the user has an email.

func (*SendPasswordResetRequest) Descriptor deprecated

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

Deprecated: Use SendPasswordResetRequest.ProtoReflect.Descriptor instead.

func (*SendPasswordResetRequest) GetIdentifier

func (x *SendPasswordResetRequest) GetIdentifier() *model.UserIdentifier

func (*SendPasswordResetRequest) ProtoMessage

func (*SendPasswordResetRequest) ProtoMessage()

func (*SendPasswordResetRequest) ProtoReflect

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

func (*SendPasswordResetRequest) Reset

func (x *SendPasswordResetRequest) Reset()

func (*SendPasswordResetRequest) String

func (x *SendPasswordResetRequest) String() string

type SendPasswordResetResponse

type SendPasswordResetResponse struct {

	// JWT token to reset the password.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

Empty response to the send password reset request

func (*SendPasswordResetResponse) Descriptor deprecated

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

Deprecated: Use SendPasswordResetResponse.ProtoReflect.Descriptor instead.

func (*SendPasswordResetResponse) GetToken

func (x *SendPasswordResetResponse) GetToken() string

func (*SendPasswordResetResponse) ProtoMessage

func (*SendPasswordResetResponse) ProtoMessage()

func (*SendPasswordResetResponse) ProtoReflect

func (*SendPasswordResetResponse) Reset

func (x *SendPasswordResetResponse) Reset()

func (*SendPasswordResetResponse) String

func (x *SendPasswordResetResponse) String() string

type SendVerificationEmailRequest

type SendVerificationEmailRequest struct {

	// User identifier of the user.
	Identifier *model.UserIdentifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// contains filtered or unexported fields
}

Request to send an email containing the code for the email verification flow. This is an upsert, and will invalidate the current verification-code if it exists. Only possible if an email-provider is configured, and the user has en email.

func (*SendVerificationEmailRequest) Descriptor deprecated

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

Deprecated: Use SendVerificationEmailRequest.ProtoReflect.Descriptor instead.

func (*SendVerificationEmailRequest) GetIdentifier

func (*SendVerificationEmailRequest) ProtoMessage

func (*SendVerificationEmailRequest) ProtoMessage()

func (*SendVerificationEmailRequest) ProtoReflect

func (*SendVerificationEmailRequest) Reset

func (x *SendVerificationEmailRequest) Reset()

func (*SendVerificationEmailRequest) String

type SendVerificationEmailResponse

type SendVerificationEmailResponse struct {

	// JWT token to verify the email.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

Empty response for sending a verification email

func (*SendVerificationEmailResponse) Descriptor deprecated

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

Deprecated: Use SendVerificationEmailResponse.ProtoReflect.Descriptor instead.

func (*SendVerificationEmailResponse) GetToken

func (x *SendVerificationEmailResponse) GetToken() string

func (*SendVerificationEmailResponse) ProtoMessage

func (*SendVerificationEmailResponse) ProtoMessage()

func (*SendVerificationEmailResponse) ProtoReflect

func (*SendVerificationEmailResponse) Reset

func (x *SendVerificationEmailResponse) Reset()

func (*SendVerificationEmailResponse) String

type ServiceClient

type ServiceClient interface {
	// Login authenticats a user and returns a access/refresh token
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	// Logout validates the access token and blocks it afterwards
	Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
	// Get the logged in user
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	// Register creates a new user
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	// Send reset password email to the user
	SendPasswordReset(ctx context.Context, in *SendPasswordResetRequest, opts ...grpc.CallOption) (*SendPasswordResetResponse, error)
	// Reset password of the user
	ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error)
	// Delete logged in user
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	// Refresh logged in token pair
	RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenResponse, error)
	// Get auth config for how available login methods
	GetAuthConfig(ctx context.Context, in *GetAuthConfigRequest, opts ...grpc.CallOption) (*GetAuthConfigResponse, error)
	// Verify email
	VerifyEmail(ctx context.Context, in *VerifyEmailRequest, opts ...grpc.CallOption) (*VerifyEmailResponse, error)
	// Verify phone number
	VerifyPhoneNumber(ctx context.Context, in *VerifyPhoneNumberRequest, opts ...grpc.CallOption) (*VerifyPhoneNumberResponse, error)
	SendVerificationEmail(ctx context.Context, in *SendVerificationEmailRequest, opts ...grpc.CallOption) (*SendVerificationEmailResponse, error)
}

ServiceClient is the client API for Service 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.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// Login authenticats a user and returns a access/refresh token
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// Logout validates the access token and blocks it afterwards
	Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
	// Get the logged in user
	Get(context.Context, *GetRequest) (*GetResponse, error)
	// Register creates a new user
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	// Send reset password email to the user
	SendPasswordReset(context.Context, *SendPasswordResetRequest) (*SendPasswordResetResponse, error)
	// Reset password of the user
	ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error)
	// Delete logged in user
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	// Refresh logged in token pair
	RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error)
	// Get auth config for how available login methods
	GetAuthConfig(context.Context, *GetAuthConfigRequest) (*GetAuthConfigResponse, error)
	// Verify email
	VerifyEmail(context.Context, *VerifyEmailRequest) (*VerifyEmailResponse, error)
	// Verify phone number
	VerifyPhoneNumber(context.Context, *VerifyPhoneNumberRequest) (*VerifyPhoneNumberResponse, error)
	SendVerificationEmail(context.Context, *SendVerificationEmailRequest) (*SendVerificationEmailResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type Token

type Token struct {

	// Access token
	AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	// Refresh token
	RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*Token) Descriptor deprecated

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

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetAccessToken

func (x *Token) GetAccessToken() string

func (*Token) GetRefreshToken

func (x *Token) GetRefreshToken() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

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

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Delete

func (UnimplementedServiceServer) Get

func (UnimplementedServiceServer) GetAuthConfig

func (UnimplementedServiceServer) Login

func (UnimplementedServiceServer) Logout

func (UnimplementedServiceServer) RefreshToken

func (UnimplementedServiceServer) Register

func (UnimplementedServiceServer) ResetPassword

func (UnimplementedServiceServer) VerifyEmail

type UnsafeServiceServer

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

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

type UserPassword

type UserPassword struct {

	// Identifier of user. This can be username, email etc.
	Identifier *model.UserIdentifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// Password of the user
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*UserPassword) Descriptor deprecated

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

Deprecated: Use UserPassword.ProtoReflect.Descriptor instead.

func (*UserPassword) GetIdentifier

func (x *UserPassword) GetIdentifier() *model.UserIdentifier

func (*UserPassword) GetPassword

func (x *UserPassword) GetPassword() string

func (*UserPassword) ProtoMessage

func (*UserPassword) ProtoMessage()

func (*UserPassword) ProtoReflect

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

func (*UserPassword) Reset

func (x *UserPassword) Reset()

func (*UserPassword) String

func (x *UserPassword) String() string

type VerifyEmailRequest

type VerifyEmailRequest struct {

	// The verification code.
	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// The email of the user.
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// JWT token to verify the email.
	Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

Request to verify the email of a user with a verification code sent to the email.

func (*VerifyEmailRequest) Descriptor deprecated

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

Deprecated: Use VerifyEmailRequest.ProtoReflect.Descriptor instead.

func (*VerifyEmailRequest) GetCode

func (x *VerifyEmailRequest) GetCode() string

func (*VerifyEmailRequest) GetEmail

func (x *VerifyEmailRequest) GetEmail() string

func (*VerifyEmailRequest) GetToken

func (x *VerifyEmailRequest) GetToken() string

func (*VerifyEmailRequest) ProtoMessage

func (*VerifyEmailRequest) ProtoMessage()

func (*VerifyEmailRequest) ProtoReflect

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

func (*VerifyEmailRequest) Reset

func (x *VerifyEmailRequest) Reset()

func (*VerifyEmailRequest) String

func (x *VerifyEmailRequest) String() string

type VerifyEmailResponse

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

Empty response to the Verify Email Request.

func (*VerifyEmailResponse) Descriptor deprecated

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

Deprecated: Use VerifyEmailResponse.ProtoReflect.Descriptor instead.

func (*VerifyEmailResponse) ProtoMessage

func (*VerifyEmailResponse) ProtoMessage()

func (*VerifyEmailResponse) ProtoReflect

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

func (*VerifyEmailResponse) Reset

func (x *VerifyEmailResponse) Reset()

func (*VerifyEmailResponse) String

func (x *VerifyEmailResponse) String() string

type VerifyPhoneNumberRequest

type VerifyPhoneNumberRequest struct {
	Code        string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// contains filtered or unexported fields
}

Request to verify the phone number of a user with a verification code sent to the phone number.

func (*VerifyPhoneNumberRequest) Descriptor deprecated

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

Deprecated: Use VerifyPhoneNumberRequest.ProtoReflect.Descriptor instead.

func (*VerifyPhoneNumberRequest) GetCode

func (x *VerifyPhoneNumberRequest) GetCode() string

func (*VerifyPhoneNumberRequest) GetPhoneNumber

func (x *VerifyPhoneNumberRequest) GetPhoneNumber() string

func (*VerifyPhoneNumberRequest) ProtoMessage

func (*VerifyPhoneNumberRequest) ProtoMessage()

func (*VerifyPhoneNumberRequest) ProtoReflect

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

func (*VerifyPhoneNumberRequest) Reset

func (x *VerifyPhoneNumberRequest) Reset()

func (*VerifyPhoneNumberRequest) String

func (x *VerifyPhoneNumberRequest) String() string

type VerifyPhoneNumberResponse

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

Empty response to the Verify Phone Number Request.

func (*VerifyPhoneNumberResponse) Descriptor deprecated

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

Deprecated: Use VerifyPhoneNumberResponse.ProtoReflect.Descriptor instead.

func (*VerifyPhoneNumberResponse) ProtoMessage

func (*VerifyPhoneNumberResponse) ProtoMessage()

func (*VerifyPhoneNumberResponse) ProtoReflect

func (*VerifyPhoneNumberResponse) Reset

func (x *VerifyPhoneNumberResponse) Reset()

func (*VerifyPhoneNumberResponse) String

func (x *VerifyPhoneNumberResponse) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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