updated check of algorithm in signing method"

pull/166/merge
Mike Derryberry 2012-07-25 09:21:34 -04:00 committed by Justin Richer
parent 99bc1294e3
commit 1efe7a1fc3
1 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,8 @@ import java.security.NoSuchAlgorithmException;
import java.util.List;
import org.mitre.jwt.model.Jwt;
import com.google.common.base.Objects;
import com.google.common.base.Splitter;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
@ -61,7 +63,7 @@ public abstract class AbstractJwtSigner implements JwtSigner {
// algorithm type doesn't match
// TODO: should this be an error or should we just fix it in the incoming jwt?
// for now, we fix the Jwt
jwt.getHeader().setAlgorithm(algorithm);
jwt.getHeader().setAlgorithm(algorithm.getJwaName());
}*/
String sig = generateSignature(jwt.getSignatureBase());