Closed shanmukhavarma11 closed 3 years ago
@shanmukhavarma11 As I said in https://github.com/spring-projects/spring-boot/issues/26884#issuecomment-860542858, this sort of question really belongs on Stack Overflow as we prefer to use the issue tracker purely for bugs and enhancements.
@shanmukhavarma11 As I said in #26884 (comment), this sort of question really belongs on Stack Overflow as we prefer to use the issue tracker purely for bugs and enhancements.
sorry, reason I am posting here is I am not getting reply from statckoverflow and also I had 2 days to complete this task
Hai,
I am trying to consume fitbit data using oauth2 springboot, in this process I could able to get the authorization code and access_token but the problem is with userInfoUri: https://api.fitbit.com/1/user/-/profile.json and userNameAttribute: user userinfoUri give below response.
}
As we can observer output we cannot find username but we can find the fullname in user, now I want to set the userName as fullName and I need to get the access_token after authentication using below code
if this not the way suggest or provide the example.
below is my code for .yml
here is security config:
}}
CustomRequestEntityConverter.java
OAuth2AccessTokenResponseConverterWithDefaults.java
UserDetailsModel.java
}
webclient.java
}
RestController
I am not getting while access token in the restcontroller:
A mousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105) ~[spring-security-web-5.5.0.jar:5.5.0] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring- security-web-5.5.0.jar:5.5.0] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.d
And I have crossed checked that and I got the accessToken Thank you.