These are chat archives for spring-cloud/spring-cloud

31st
Oct 2016
pradeepkusingh
@pradeepkusingh
Oct 31 2016 14:47
@spencergibb : how to read request body in zuul filter ? do we have any sample ?
Marcin Grzejszczak
@marcingrzejszczak
Oct 31 2016 14:53
@pradeepkusingh RequestContext.getCurrentContext().getRequest() gives you javax.servlet.http.HttpServletRequest
Spencer Gibb
@spencergibb
Oct 31 2016 15:04
:+1:
pradeepkusingh
@pradeepkusingh
Oct 31 2016 16:06
hanks.. I did it. should I use HTTPServletWrapper to get that request ?
Thanks
pradeepkusingh
@pradeepkusingh
Oct 31 2016 18:38
@spencergibb : in Zuul filter how can I redirect call to a new URI ?
Spencer Gibb
@spencergibb
Oct 31 2016 18:40
RequestContext.getCurrentContext().getResponse() gives you javax.servlet.http.HttpServletResponse
pradeepkusingh
@pradeepkusingh
Oct 31 2016 19:05
@spencergibb Thanks for help. One .. QQ I am seeing this erro in camden based zuul and have no clue what is wrong
org.apache.coyote.http11.Http11Processor - Error parsing HTTP request header
what does this means ? any idea ?
i am writing a filter to send the call to different service id based on account number
and it works fine for Services , issue is only in UI
Spencer Gibb
@spencergibb
Oct 31 2016 19:07
no idea what that means
pradeepkusingh
@pradeepkusingh
Oct 31 2016 19:07
hmm...don't see much details except this error parsing ...
pradeepkusingh
@pradeepkusingh
Oct 31 2016 19:33
@spencergibb one qq if I have 2 version of UI deployed and registered in eureka with different names/service id and I am specifying resource location in zuul properties then how can I do I say use different resoucres ?
I have added resources as activator-web-images:
path: /Includes/**
stripPrefix: false
now if I have to say one version to use latest resource like image changes
Kirill Tolkachev
@lavcraft
Oct 31 2016 20:18

Hi all.
I am using spring-security oauth2 with my spring boot application.

I have a custom oauth2 server with signed (not encrypted, only signed) JTI token (OpenID Connect based server, Oauth 2 compatible i guess).

I want to make Gateway for proxy all request and integrate non secure api with authorization server:

@EnableOAuth2Sso
@EnableZuulProxy
@EnableResourceServer
class Applicatoin { ...

But, after set token-info-uri spring start use RemoteTokenService: https://github.com/spring-projects/spring-security-oauth/blob/master/spring-security-oauth2/src/main/java/org/springframework/security/oauth2/provider/token/RemoteTokenServices.java#L61

How to unpack my jwt token after call remote authorizatoin server (/check_token) and change hardcoded tokenConverte in RemoteTokenService?

private AccessTokenConverter tokenConverter = new DefaultAccessTokenConverter();
What i am doing wrong?
Kirill Tolkachev
@lavcraft
Oct 31 2016 20:35
Is it possible?