package com.nb.auth.granter; import com.nb.auth.enums.GrantTypeEnum; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; /** * 登录实体类 * * @author Kevin */ @Data public class TokenParameter implements Serializable { @ApiModelProperty(value = "授权方式 ",allowableValues = "1(web账密登录), 2 (手机短信登录),3(第三方应用登陆), 4(app医生登录), 5(疼痛小管家手机账密登录)6(疼痛小管家手机一键登录)") GrantTypeEnum grantType; @ApiModelProperty("用户名 账密登录、app医生登录、疼痛小管家账密(此处用户名即为用户的手机号)登录时使用") String username; @ApiModelProperty("密码 账密登录、app医生登录、疼痛小管家账密登录时使用") String password; @ApiModelProperty("验证码,web账密登录、疼痛小管家手机验证码时使用") String code; @ApiModelProperty("验证码key,web账密登录时使用") String codeKey; @ApiModelProperty("第三方应用登陆时使用") String appKey; @ApiModelProperty("第三方应用登录时使用时的签名") String sign; @ApiModelProperty("第三方应用登录时使用的时间戳,用来获取签名") String timestamp; public void setGrantType(String grantType) { this.grantType = GrantTypeEnum.valueOfCode(grantType); } }