RSA加密登录时账号和密码
This commit is contained in:
@ -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 {
|
||||
}
|
@ -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:";
|
||||
|
||||
/**
|
||||
* 登录成功
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user