Khoa Nguyen created OLTU-184:
--------------------------------

             Summary: 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


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 cause the IllegalArgumentException.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to