RSA加密登录时账号和密码

This commit is contained in:
WrV
2022-02-09 16:50:22 +08:00
parent 612c4293d1
commit 94c81296d0
11 changed files with 560 additions and 375 deletions

View File

@ -0,0 +1,16 @@
package com.ruoyi.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* RSA解密注解
* 使用该注解,可以对已经加密的参数进行解密
* @author wrw
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface DecryptLogin {
}

View File

@ -39,6 +39,11 @@ public class Constants
*/
public static final String FAIL = "1";
/**
* 预登录 redis key
*/
public static final String PRE_LOGIN_KEY = "pre_login_key:";
/**
* 登录成功
*/

View File

@ -27,6 +27,11 @@ public class LoginBody
*/
private String uuid = "";
/**
* RSA公钥
*/
private String publicKey;
public String getUsername()
{
return username;
@ -66,4 +71,8 @@ public class LoginBody
{
this.uuid = uuid;
}
public String getPublicKey() {
return publicKey;
}
}