Use string tokens

This commit is contained in:
René Pfeuffer
2020-09-29 13:54:21 +02:00
parent 2f96ec0d21
commit 0dc96c2403
3 changed files with 29 additions and 17 deletions

View File

@@ -59,9 +59,9 @@ class ApiKeyTokenHandler {
}
}
Optional<Token> readToken(String asString) {
Optional<Token> readToken(String token) {
try {
return of(OBJECT_MAPPER.readValue(decoder.decode(asString), Token.class));
return of(OBJECT_MAPPER.readValue(decoder.decode(token), Token.class));
} catch (IOException | DecodingException e) {
LOG.warn("error reading api token", e);
return empty();