问题描述
我有这个JWT验证模块,我需要在此基于Identity Provider用于签名的“ alg”构建算法实例。 可以是“ RS256”,“ HS256”,“ RS512”或其他任何值。
Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) getPublicKey(),null);
Verification verifier = JWT.require(algorithm);
verifier.build().verify(Jwt);
因此,我的代码行“ Algorithm.RSA256((RSAPublicKey)....”现在已进行硬编码。 如何根据环境属性输入使它通用?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)