-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($auth-center): provide remote service: get user for
api-portal
- Loading branch information
1 parent
9c64522
commit 71daf55
Showing
19 changed files
with
697 additions
and
44 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
api-portal/src/main/java/com/jmsoftware/apiportal/remoteapi/authcenter/package-info.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 @@ | ||
package com.jmsoftware.apiportal.remoteapi.authcenter; |
28 changes: 28 additions & 0 deletions
28
...ortal/src/main/java/com/jmsoftware/apiportal/remoteapi/authcenter/user/UserRemoteApi.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,28 @@ | ||
package com.jmsoftware.apiportal.remoteapi.authcenter.user; | ||
|
||
import com.jmsoftware.common.bean.ResponseBodyBean; | ||
import com.jmsoftware.common.domain.authcenter.user.GetUserByLoginTokenPayload; | ||
import com.jmsoftware.common.domain.authcenter.user.GetUserByLoginTokenResponse; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
/** | ||
* <h1>UserRemoteApi</h1> | ||
* <p> | ||
* Change description here. | ||
* | ||
* @author Johnny Miller (鍾俊), email: johnnysviva@outlook.com | ||
* @date 5/10/20 4:50 PM | ||
*/ | ||
@FeignClient(name = "auth-center") | ||
public interface UserRemoteApi { | ||
/** | ||
* Gets user by login token. | ||
* | ||
* @param payload the payload | ||
* @return the user by login token | ||
*/ | ||
@PostMapping("/user/get-user-by-login-token") | ||
ResponseBodyBean<GetUserByLoginTokenResponse> getUserByLoginToken(@RequestBody GetUserByLoginTokenPayload payload); | ||
} |
1 change: 1 addition & 0 deletions
1
api-portal/src/main/java/com/jmsoftware/apiportal/remoteapi/package-info.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 @@ | ||
package com.jmsoftware.apiportal.remoteapi; |
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
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 |
---|---|---|
|
@@ -37,6 +37,7 @@ feign: | |
default: | ||
connectTimeout: 5000 | ||
readTimeout: 10000 | ||
loggerLevel: basic | ||
|
||
management: | ||
endpoints: | ||
|
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
21 changes: 21 additions & 0 deletions
21
auth-center/src/main/java/com/jmsoftware/authcenter/user/controller/UserController.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,21 @@ | ||
package com.jmsoftware.authcenter.user.controller; | ||
|
||
import com.jmsoftware.authcenter.user.service.UserService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
/** | ||
* <h1>UserController</h1> | ||
* <p> | ||
* Controller implementation of UserPersistence.(UserPersistence) | ||
* | ||
* @author Johnny Miller (鍾俊) | ||
* @date 2020-05-10 12:08:28 | ||
*/ | ||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/user") | ||
public class UserController { | ||
private final UserService userService; | ||
} |
67 changes: 67 additions & 0 deletions
67
auth-center/src/main/java/com/jmsoftware/authcenter/user/entity/UserPersistence.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,67 @@ | ||
package com.jmsoftware.authcenter.user.entity; | ||
|
||
import lombok.Data; | ||
|
||
import java.io.Serializable; | ||
import java.util.Date; | ||
|
||
/** | ||
* <h1>UserPersistence</h1> | ||
* <p> | ||
* User Persistence object class | ||
* | ||
* @author Johnny Miller (鍾俊), e-mail: johnnysviva@outlook.com | ||
* @date 5/10/20 12:12 PM | ||
*/ | ||
@Data | ||
public class UserPersistence implements Serializable { | ||
private static final long serialVersionUID = -11418821727467072L; | ||
/** | ||
* Primary key of user | ||
*/ | ||
private Long id; | ||
/** | ||
* Username | ||
*/ | ||
private String username; | ||
/** | ||
*/ | ||
private String email; | ||
/** | ||
* Cellphone number | ||
*/ | ||
private String cellphone; | ||
/** | ||
* Password | ||
*/ | ||
private String password; | ||
/** | ||
* Full name | ||
*/ | ||
private String fullName; | ||
/** | ||
* Birthday | ||
*/ | ||
private Date birthday; | ||
/** | ||
* 26 gender options | ||
*/ | ||
private String gender; | ||
/** | ||
* UserPersistence avatar full path on SFTP server | ||
*/ | ||
private String avatar; | ||
/** | ||
* Status. 1 - enabled, 2 - disabled | ||
*/ | ||
private Integer status; | ||
/** | ||
* Created time | ||
*/ | ||
private Date createdTime; | ||
/** | ||
* Modified time | ||
*/ | ||
private Date modifiedTime; | ||
} |
Oops, something went wrong.