camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Messer <>
Subject Camel-olingo2 and CSRF Token
Date Tue, 19 Jul 2016 10:49:00 GMT
Hello everyone,

I implemented a spring boot based odata service, this service adds an CSRF Token as header
value in the response message. This works as expected.
But i could not find a solution to retrieve that token, when accessing the service with the
camel-olingo2 api.
For example:
    .process(p-> {
    .log("CREATE: ${body}");
This will generate 2 requests to the service. At first a 'GET' request for the '$metadata',
where the CSRF Token is returned from the service. And then this will generate a 'POST' request
to submit the Entity to the odata service. And here i could not find a solution to grab the
the token from the 'GET' request to put it into the 'olingoconfiguration.httpHeaders'.
Currently i am thinking of:
change the camel source code accordingly to provide the response headers. (only if there is
no other solution)
Use an Aspect to retrieve the Token. (Not a nice approach)
But maybe i missed something here and you guys can point me in the right direction?

i already asked that question here:

But I think, to ask my question here might be better.. ;)

Best Regards and thanks in advance

IMPORTANT NOTICE: This e-mail, and each of any attachments transmitted with it, is confidential,
is the property of Kewill GmbH, and is intended solely for the information of the individual/entity
to whom this e-mail is addressed. It may also be privileged or protected by other legal rules.
If you have received it by mistake, please notify the author immediately by replying to this
e-mail and then destroy/delete this e-mail and all attachments (if any). If you are not the
intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.
In accordance with Kewill's internal policy e-mails sent and/or received may be monitored.
Whilst Kewill takes reasonable precautions (including use of anti-virus software) it accepts
no responsibility for any loss or damage should this e-mail contain any virus, or similar
destructive or mischievous code. (c)Kewill 2013. Kewill GmbH (HRB 3317) - registered in Germany
at Marienbader Platz. 1, 61348 Bad Homburg. Kewill GmbH * vertreten durch die Gesch?ftsf?hrer:
Andreas Heil,*Andrew Hicks, Gesellschaftssitz: 61348 Bad Homburg v. d. H., Marienbader Platz
1 * Eintragung: Amtsgericht Bad Homburg v. d. H. (HRB 3317)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message