feat:() 登录服务接口调试
parent
4e3cde9209
commit
c79b299b32
|
@ -0,0 +1,41 @@
|
||||||
|
package com.muyu.auth.domain;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName TokenResp
|
||||||
|
* @Description token响应实体类
|
||||||
|
* @Author Chen
|
||||||
|
* @Date 2024/8/9 16:40
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Tag(name = "token响应结果集", description = "包含token和token有效时间")
|
||||||
|
public class TokenResp {
|
||||||
|
/**
|
||||||
|
* token令牌
|
||||||
|
*/
|
||||||
|
@Schema(title = "token令牌",
|
||||||
|
type = "String",
|
||||||
|
defaultValue = "eyJ09.eyJ1sInN1YlcmlwaJ9.Y52eWUak1LpIK5R8",
|
||||||
|
description = "JWT令牌,包含头,载体,尾")
|
||||||
|
private String accessToken;
|
||||||
|
/**
|
||||||
|
* 有效时间
|
||||||
|
*/
|
||||||
|
@Schema(
|
||||||
|
title = "令牌有效时间",
|
||||||
|
type = "Long",
|
||||||
|
defaultValue = "720",
|
||||||
|
description = "过期时间,时间单位为分钟(MIN)"
|
||||||
|
)
|
||||||
|
private Long expiresIn;
|
||||||
|
|
||||||
|
}
|
|
@ -1,34 +0,0 @@
|
||||||
package com.muyu.auth.form;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户登录对象
|
|
||||||
*
|
|
||||||
* @author muyu
|
|
||||||
*/
|
|
||||||
public class LoginBody {
|
|
||||||
/**
|
|
||||||
* 用户名
|
|
||||||
*/
|
|
||||||
private String username;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户密码
|
|
||||||
*/
|
|
||||||
private String password;
|
|
||||||
|
|
||||||
public String getUsername () {
|
|
||||||
return username;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUsername (String username) {
|
|
||||||
this.username = username;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPassword () {
|
|
||||||
return password;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPassword (String password) {
|
|
||||||
this.password = password;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.muyu.auth.form;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户登录对象
|
||||||
|
*
|
||||||
|
* @author muyu
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Tag(name = "登录请求实体类")
|
||||||
|
public class LoginUserReq {
|
||||||
|
/**
|
||||||
|
* 用户名
|
||||||
|
*/
|
||||||
|
@Schema(title = "用户名称",
|
||||||
|
type = "String",
|
||||||
|
defaultValue = "admin",
|
||||||
|
description="登录用户名称"
|
||||||
|
)
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户密码
|
||||||
|
*/
|
||||||
|
@Schema(title = "用户名称",
|
||||||
|
type = "String",
|
||||||
|
defaultValue = "admin123",
|
||||||
|
description="登录用户密码"
|
||||||
|
)
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
}
|
|
@ -5,6 +5,6 @@ package com.muyu.auth.form;
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author muyu
|
||||||
*/
|
*/
|
||||||
public class RegisterBody extends LoginBody {
|
public class RegisterUserReq extends LoginUserReq {
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue