-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
75 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 13 additions & 11 deletions
24
src/main/java/org/swmaestro/repl/gifthub/auth/entity/RefreshToken.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,37 @@ | ||
package org.swmaestro.repl.gifthub.auth.entity; | ||
|
||
import org.swmaestro.repl.gifthub.util.BaseTimeEntity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.*; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.data.annotation.CreatedDate; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class RefreshToken extends BaseTimeEntity { | ||
public class RefreshToken { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Column(nullable = false) | ||
private String refreshToken; | ||
private String token; | ||
|
||
@Column(length = 60, nullable = false) | ||
private String username; | ||
|
||
@CreatedDate | ||
@Column(nullable = false) | ||
private LocalDateTime createdAt; | ||
|
||
@Builder | ||
public RefreshToken(Long id, String refreshToken, String username) { | ||
public RefreshToken(Long id, String token, String username, LocalDateTime createdAt) { | ||
this.id = id; | ||
this.refreshToken = refreshToken; | ||
this.token = token; | ||
this.username = username; | ||
this.createdAt = createdAt; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/org/swmaestro/repl/gifthub/auth/repository/DeviceTokenRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.swmaestro.repl.gifthub.auth.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.swmaestro.repl.gifthub.auth.entity.DeviceToken; | ||
|
||
public interface DeviceTokenRepository extends JpaRepository<DeviceToken, Long> { | ||
} |
7 changes: 0 additions & 7 deletions
7
src/main/java/org/swmaestro/repl/gifthub/auth/repository/UserTokenRepository.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters