You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oltu.apache.org by "Antonio Sanso (JIRA)" <ji...@apache.org> on 2016/02/26 09:47:18 UTC
[jira] [Commented] (OLTU-189) Signature Validation Error
[ https://issues.apache.org/jira/browse/OLTU-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15168668#comment-15168668 ]
Antonio Sanso commented on OLTU-189:
------------------------------------
[~prabhalar] attaching a test case might help :)
> Signature Validation Error
> --------------------------
>
> Key: OLTU-189
> URL: https://issues.apache.org/jira/browse/OLTU-189
> Project: Apache Oltu
> Issue Type: Bug
> Components: jose-jws
> Affects Versions: oauth2-1.0.0
> Reporter: Raghu Prabhala
>
> Signature validation fails due to a bug in the JWS.java. The validate method fails in some cases as the elements of header and payload are constructed back (see below) in a sorted order which could be different from the original order in which the token was sent by the authorization serve.
> I was able to validate the signature by doing the validation outside of this method/class by storing the actual encoded header, payload and using them. Can this be addressed?
> return method.verify(signature,
> TokenDecoder.base64Encode(new JWSHeaderWriter().write(header)),
> TokenDecoder.base64Encode(payload), verifyingKey)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)