|
@@ -5,7 +5,7 @@ import com.iden.common.vo.UserLoginedConvertVO;
|
|
import io.jsonwebtoken.Claims;
|
|
import io.jsonwebtoken.Claims;
|
|
import io.jsonwebtoken.Jwts;
|
|
import io.jsonwebtoken.Jwts;
|
|
import io.jsonwebtoken.SignatureAlgorithm;
|
|
import io.jsonwebtoken.SignatureAlgorithm;
|
|
-import org.apache.commons.codec.binary.Base64;
|
|
|
|
|
|
+import java.util.Base64;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.core.env.Environment;
|
|
import org.springframework.core.env.Environment;
|
|
@@ -33,7 +33,7 @@ public class JwtUtils {
|
|
*/
|
|
*/
|
|
public static SecretKey generalKey() {
|
|
public static SecretKey generalKey() {
|
|
String stringKey = CommonConfUtil.getConf("auth.jwt.id") + CommonConfUtil.getConf("auth.jwt.secret");
|
|
String stringKey = CommonConfUtil.getConf("auth.jwt.id") + CommonConfUtil.getConf("auth.jwt.secret");
|
|
- byte[] encodedKey = Base64.decodeBase64(stringKey);
|
|
|
|
|
|
+ byte[] encodedKey = stringKey.getBytes();
|
|
SecretKey key = new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES");
|
|
SecretKey key = new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES");
|
|
return key;
|
|
return key;
|
|
}
|
|
}
|