Skip to content

Commit

Permalink
feat 🚀 Auth 관련 class 추가
Browse files Browse the repository at this point in the history
#23
- User class 추가
- GithubAccessToken class 추가
  • Loading branch information
sedin2 committed Jun 2, 2020
1 parent 2e5f045 commit 3c5ba78
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package kr.codesquad.airbnb12.domain;

import com.fasterxml.jackson.annotation.JsonProperty;

public class GithubAccessToken {

@JsonProperty("access_token")
private String accessToken;

@JsonProperty("token_type")
private String tokenType;

public GithubAccessToken() { }

public GithubAccessToken(String accessToken, String tokenType) {
this.accessToken = accessToken;
this.tokenType = tokenType;
}

public String getAccessToken() {
return accessToken;
}

public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}

public String getTokenType() {
return tokenType;
}

public void setTokenType(String tokenType) {
this.tokenType = tokenType;
}
}
31 changes: 31 additions & 0 deletions BE/src/main/java/kr/codesquad/airbnb12/domain/User.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
package kr.codesquad.airbnb12.domain;

public class User {

private Long id;

private String email;

public User() {}

public User(Long id, String email) {
this.id = id;
this.email = email;
}

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public static User create(Long id, String email) {
return new User(id, email);
}
}

0 comments on commit 3c5ba78

Please sign in to comment.