use of se.inera.intyg.webcert.web.auth.eleg.FakeElegAuthenticationToken in project webcert by sklintyg.
the class FakeAuthenticationFilter method performFakeElegAuthentication.
private Authentication performFakeElegAuthentication(String json) {
try {
FakeElegCredentials fakeElegCredentials = new ObjectMapper().readValue(json, FakeElegCredentials.class);
LOG.info("Detected fake credentials " + fakeElegCredentials);
return getAuthenticationManager().authenticate(new FakeElegAuthenticationToken(fakeElegCredentials));
} catch (IOException e) {
String message = "Failed to parse JSON for fake E-leg: " + json;
LOG.error(message, e);
throw new RuntimeException(message, e);
}
}
Aggregations