Skip to content

Commit

Permalink
[java][social_login-01_base] Add base structure
Browse files Browse the repository at this point in the history
  • Loading branch information
rgomezcasas committed Apr 22, 2021
1 parent c947f9c commit 94f3d6f
Show file tree
Hide file tree
Showing 17 changed files with 152 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tv.codely.app.controller.login;

public final class EmailLoginPostController {
public void post(String email, String password) {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tv.codely.app.controller.login;

public final class TwitterLoginPostController {
public void post(String username, String token) {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tv.codely.app.controller.sign_up;

public final class EmailSignUpPostController {
public void post(String email, String password) {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tv.codely.app.controller.sign_up;

public final class TwitterSignUpPostController {
public void post(String username, String token) {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package tv.codely.ecommerce.login;

public final class EmailLoginProvider extends LoginProvider {
private final String email;
private final String password;

public EmailLoginProvider(String email, String password, String ip) {
super("email", ip);
this.email = email;
this.password = password;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package tv.codely.ecommerce.login;

public final class FacebookLoginProvider extends LoginProvider {
private final String email;
private final String hash;

public FacebookLoginProvider(String email, String hash, String ip) {
super("facebook", ip);
this.email = email;
this.hash = hash;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package tv.codely.ecommerce.login;

public final class GitHubLoginProvider extends LoginProvider {
private final String username;
private final String secretKey;

public GitHubLoginProvider(String username, String secretKey, String ip) {
super("github", ip);

this.username = username;
this.secretKey = secretKey;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package tv.codely.ecommerce.login;

public abstract class LoginProvider {
private String provider;
private String ip;

public LoginProvider(String provider, String ip) {
this.provider = provider;
this.ip = ip;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package tv.codely.ecommerce.login;

public final class TwitterLoginProvider extends LoginProvider {
private String username;
private String token;

public TwitterLoginProvider(String username, String token, String ip) {
super("twitter", ip);
this.username = username;
this.token = token;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tv.codely.ecommerce.login_attempt;

public abstract class LoginAttempt {
public LoginAttempt(String dsf) {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package tv.codely.ecommerce.sign_up;

public final class EmailSignUpProvider extends SignUpProvider {
private final String email;
private final String password;

public EmailSignUpProvider(String email, String password) {
super("email");
this.email = email;
this.password = password;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package tv.codely.ecommerce.sign_up;

public final class FacebookSignUpProvider extends SignUpProvider {
private final String email;
private final String hash;

public FacebookSignUpProvider(String email, String hash) {
super("facebook");
this.email = email;
this.hash = hash;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package tv.codely.ecommerce.sign_up;

public final class GitHubSignUpProvider extends SignUpProvider {
private final String username;
private final String secretKey;

public GitHubSignUpProvider(String username, String secretKey) {
super("github");
this.username = username;
this.secretKey = secretKey;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package tv.codely.ecommerce.sign_up;

public abstract class SignUpProvider {
private String provider;

public SignUpProvider(String provider) {
this.provider = provider;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package tv.codely.ecommerce.sign_up;

public final class TwitterSignUpProvider extends SignUpProvider {
private String username;
private String token;

public TwitterSignUpProvider(String username, String token) {
super("twitter");
this.username = username;
this.token = token;
}
}

This file was deleted.

This file was deleted.

0 comments on commit 94f3d6f

Please sign in to comment.