Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToUserDetailsResponse ¶
func ConvertToUserDetailsResponse(userResponse *protos.LoginResponse) *protos.User
func GenerateEncryptedKey ¶
Takes password and email, salt and returns encrypted key
func GenerateSalt ¶
Types ¶
type AuthClient ¶
type AuthClient interface { //Sign up methods SignUp(email string, password string) ([]byte, error) SignupEmailResendCode(ctx context.Context, data *protos.SignupEmailResendRequest) (bool, error) SignupEmailConfirmation(ctx context.Context, data *protos.ConfirmSignupRequest) (bool, error) //Login methods GetSalt(ctx context.Context, email string) (*protos.GetSaltResponse, error) LoginPrepare(ctx context.Context, loginData *protos.PrepareRequest) (*protos.PrepareResponse, error) Login(email string, password string, deviceId string) (*protos.LoginResponse, []byte, error) // Recovery methods StartRecoveryByEmail(ctx context.Context, loginData *protos.StartRecoveryByEmailRequest) (bool, error) CompleteRecoveryByEmail(ctx context.Context, loginData *protos.CompleteRecoveryByEmailRequest) (bool, error) ValidateEmailRecoveryCode(ctx context.Context, loginData *protos.ValidateRecoveryCodeRequest) (*protos.ValidateRecoveryCodeResponse, error) // Change email methods ChangeEmail(ctx context.Context, loginData *protos.ChangeEmailRequest) (bool, error) // Complete change email methods CompleteChangeEmail(ctx context.Context, loginData *protos.CompleteChangeEmailRequest) (bool, error) DeleteAccount(ctc context.Context, loginData *protos.DeleteUserRequest) (bool, error) //Logout SignOut(ctx context.Context, logoutData *protos.LogoutRequest) (bool, error) Healthz(ctx context.Context) (bool, error) }
func NewClient ¶
func NewClient(baseURL string, userConfig func() common.UserConfig) AuthClient
NewClient creates a new instance of AuthClient
Click to show internal directories.
Click to hide internal directories.