mirror of
https://gitee.com/huoyo/ko-time.git
synced 2025-12-06 16:58:26 +08:00
optimize the auth
This commit is contained in:
parent
f85ba6eecd
commit
c1f1e51862
@ -7,9 +7,10 @@ import com.auth0.jwt.exceptions.JWTVerificationException;
|
|||||||
import com.auth0.jwt.interfaces.DecodedJWT;
|
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
public class KoUtil {
|
public class KoUtil {
|
||||||
private static final String koTimeSecret = "KotimeLang";
|
private final static String koTimeSecret = UUID.randomUUID().toString().replace("-","");
|
||||||
|
|
||||||
public static String login(String userName) {
|
public static String login(String userName) {
|
||||||
Algorithm algorithm = Algorithm.HMAC256(koTimeSecret);
|
Algorithm algorithm = Algorithm.HMAC256(koTimeSecret);
|
||||||
@ -45,5 +46,4 @@ public class KoUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user