-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuthFacade.cs
More file actions
28 lines (27 loc) · 812 Bytes
/
Copy pathAuthFacade.cs
File metadata and controls
28 lines (27 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
using System.Text;
using VideoConverter.AuthLibrary;
namespace VideoConverter
{
public class AuthFacade
{
public static void Register(string username, string email, string password, string phonenumber)
{
User user = new User()
{
UserName = username,
Email = email,
Password = password,
PhoneNumber = phonenumber
};
Authenticator.Register(user);
int token = Authenticator.Login(user.Email, user.Password);
Authenticator.SendEmailConfirmation(user);
}
public static void Login(string email, string password)
{
Authenticator.Login(email, password);
}
}
}