oltu-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khoa Nguyen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OLTU-184) Failed to parse generated Base64 JWT back
Date Tue, 22 Dec 2015 08:11:46 GMT
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

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

View raw message