package com.iailab.module.system.controller.admin.oauth2.vo.open; import cn.hutool.core.util.StrUtil; import com.iailab.framework.common.validation.InEnum; import com.iailab.module.system.enums.social.SocialTypeEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.AssertTrue; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; @Schema(description = "管理后台 - 账号密码授权登录 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class OAuth2OpenLoginReqVO { // @Schema(description = "客户端编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "tudou") // private String clientId; // // @Schema(description = "客户端密钥", requiredMode = Schema.RequiredMode.REQUIRED, example = "fan") // private String clientSecret; @Schema(description = "授权类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "password") private String grantType; //授权码模式 @Schema(description = "授权范围", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String code; @Schema(description = "重定向 URI", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String redirectUri; @Schema(description = "状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String state; //密码模式 @Schema(description = "授权范围", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String scope; @Schema(description = "账号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "iailabyuanma") @Length(min = 4, max = 16, message = "账号长度为 4-16 位") @Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母") private String username; @Schema(description = "密码", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "buzhidao") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; //刷新模式 @Schema(description = "刷新token", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String refreshToken; }