-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuth.cpp
More file actions
62 lines (62 loc) · 1.9 KB
/
Auth.cpp
File metadata and controls
62 lines (62 loc) · 1.9 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include<bits/stdc++.h>
using namespace std;
#include"AuthenticationService.h"
int main()
{
AuthenticationService authService;
string validGoogleToken="validGoogleToken";
if(authService.googleAuth(validGoogleToken))
{
cout<<"Google Authentication with valid token: successful!"<<endl;
}
else
{
cout<<"Google Authentication with valid token: failed!"<<endl;
}
string invalidGoogleToken="invalidGoogleToken";
if(authService.googleAuth(invalidGoogleToken))
{
cout<<"Google Authentication with invalid token: successful!"<<endl;
}
else
{
cout<<"Google Authentication with invalid token: failed!"<<endl;
}
string validFacebookToken="validFacebookToken";
if(authService.facebookAuth(validFacebookToken))
{
cout<<"Facebook Authentication with valid token: successful!"<<endl;
}
else
{
cout<<"Facebook Authentication with valid token: failed!"<<endl;
}
string invalidFacebookToken="invalidFacebookToken";
if(authService.facebookAuth(invalidFacebookToken))
{
cout<<"Facebook Authentication with invalid token: successful!"<<endl;
}
else
{
cout<<"Facebook Authentication with invalid token: failed!"<<endl;
}
string validEmail="valid@example.com",validPassword="correctPassword";
if(authService.emailAuth(validEmail,validPassword))
{
cout<<"Email Authentication with valid credentials: successful!"<<endl;
}
else
{
cout<<"Email Authentication with valid credentials: failed!"<<endl;
}
string invalidEmail="invalid@example.com",invalidPassword="wrongPassword";
if(authService.emailAuth(invalidEmail,invalidPassword))
{
cout<<"Email Authentication with invalid credentials: successful!"<<endl;
}
else
{
cout<<"Email Authentication with invalid credentials: failed!"<<endl;
}
return 0;
}