[ 
https://issues.apache.org/jira/browse/OLTU-184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antonio Sanso updated OLTU-184:
-------------------------------
    Labels: review  (was: )

> Failed to parse generated Base64 JWT back
> -----------------------------------------
>
>                 Key: OLTU-184
>                 URL: https://issues.apache.org/jira/browse/OLTU-184
>             Project: Apache Oltu
>          Issue Type: Bug
>            Reporter: Khoa Nguyen
>              Labels: review
>
> The TokenReader can't parse a JWT with a dash ('-') due to the validation 
> pattern failed to match.
> The TokenDecoder uses a URL Base64 encoder/decoder which replaces "+" and "/" 
> into "-" & "_". However, in the  TokenReader, the validation pattern is:
> ```
>     private final Pattern base64urlTokenPattern = 
> Pattern.compile("([a-zA-Z0-9/+=]+)\\.([a-zA-Z0-9/+=]+)\\.(.+)");
>  ```
> ... which doesn't allow "-" or "_" and causes the IllegalArgumentException.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to