The problem seems to be in
OpenIdProviderAuthenticationService
Message authResponse = openIdServerManager.get().authResponse(parameterList, opLocalIdentifier, claimedIdentifier, authenticationSuccesful);
|
|
if (response instanceof DirectError) {
|
writeMessageToResponse(authResponse, response);
|
} else {
|
if (openIdProviderRequest.get().getRequestedAttributes() != null) {
|
try {
|
FetchResponse fetchResponse = FetchResponse.createFetchResponse(openIdProviderRequest.get().getFetchRequest(), attributeValues);
|
authResponse.addExtension(fetchResponse);
|
} catch (MessageException e) {
|
throw new RuntimeException(e);
|
}
|
}
|
The authResponse signs the message before the extension is added, therefore the signature is invalid.
Downgrading OpenID4Java from 0.9.6 (which fixes a security issue) to 0.9.5 seems to make the test happy, so it is probably caused by some change of behaviour of the library.