spring-security-oauth2

Spring Cloud Gateway Oauth2Login Return JWT Token Instead of SESSION Cookie Upon Successful Login

試著忘記壹切 提交于 2021-01-28 10:11:42
问题 sorry in advance if the question is previously asked, but I have not been able to find an answer. I am trying to setup Spring Cloud Gateway to act as a OAuth2 client to authenticate/login users via a Keycloak Authentication server. I have been able to achieve this using the following code snipet: Security Config: @Configuration @EnableWebFluxSecurity @EnableReactiveMethodSecurity public class SecurityConfig { private final GatewayAuthenticationSuccessHandler

Spring Cloud Gateway Oauth2Login Return JWT Token Instead of SESSION Cookie Upon Successful Login

自闭症网瘾萝莉.ら 提交于 2021-01-28 10:04:14
问题 sorry in advance if the question is previously asked, but I have not been able to find an answer. I am trying to setup Spring Cloud Gateway to act as a OAuth2 client to authenticate/login users via a Keycloak Authentication server. I have been able to achieve this using the following code snipet: Security Config: @Configuration @EnableWebFluxSecurity @EnableReactiveMethodSecurity public class SecurityConfig { private final GatewayAuthenticationSuccessHandler

How to use spring-cloud-sleuth to trace spring-security-oauth activities?

此生再无相见时 提交于 2021-01-27 18:31:29
问题 I'm trying to use spring-cloud-sleuth to trace https requests initiated by spring-security-oauth. But I'm stuck on that the spring-security-oauth filter OAuth2AuthenticationProcessingFilter is executed before the spring-cloud-sleuth filter TraceFilter. Can this be changed so that the spring-cloud-sleuth filter is processed before the spring-security-oauth filter? Version info: spring-boot: 1.3.5 spring-cloud: Brixton.SR3 spring-cloud-sleuth: 1.0.3 spring-security-oauth2: 2.0.9 Update: Based

Spring cloud Feign OAuth2 request interceptor is not working

一曲冷凌霜 提交于 2021-01-27 14:52:10
问题 I am trying to create a simple REST client using spring cloud feign to consume a service which is secured with OAuth2 security tokens. I am using OAuth2FeignRequestInterceptor for adding the bearer token, check my below code. I am facing 401. and when try to debug my code I don't find the bearer token in my Request object. @Configuration @EnableConfigurationProperties(value=OAuth2ClientCredentialsProperties.class) @EnableOAuth2Client @Profile(OAuth2Profiles.CLIENT_CREDENTIALS) public class

Spring Boot OAuth 2.0 and OAuth 1.0a clients in same app

佐手、 提交于 2021-01-27 06:46:24
问题 Anybody have experience using OAuth2.0 and OAuth 1.0a client authentication in same Spring Boot application? Having some trouble getting the 2 working in the same system. Our use case - User can connect multiple 3rd party accounts to our web app. This connection happens via OAuth, and in the case of 3rd party services that use OAuth 2.0, we have no problems. Now we want to add Twitter as a supported connection, with their OAuth 1.0a path we are having a lot of trouble getting this to work.

Spring Boot OAuth 2.0 and OAuth 1.0a clients in same app

你。 提交于 2021-01-27 06:44:31
问题 Anybody have experience using OAuth2.0 and OAuth 1.0a client authentication in same Spring Boot application? Having some trouble getting the 2 working in the same system. Our use case - User can connect multiple 3rd party accounts to our web app. This connection happens via OAuth, and in the case of 3rd party services that use OAuth 2.0, we have no problems. Now we want to add Twitter as a supported connection, with their OAuth 1.0a path we are having a lot of trouble getting this to work.

Ckfinder problem, how to disable token csrf in spring boot with OAuth2 (Jhipster)

99封情书 提交于 2021-01-07 06:34:57
问题 I develop a project with Jhipster framework (Angular 10 + Spring boot) and I have need a file manager. So I was choose Ckfinder. The server side in java works well in a microservice (Before, I have generated Jhipster microservice and I have adapted with sping boot app). The client side of ckfinder is already inside the dependency. So when I test the microservice on the host "http://localhost:8090/" all works. But I want to pass by my gateway, So I test on "http://localhost:8080/service/media/

Accessing JWT Token from a Spring Boot Rest Controller

爷,独闯天下 提交于 2021-01-03 07:10:45
问题 I am implementing a REST API with Spring Boot and I am securing it with JWT and Oauth 2. I have no problems with authentication and producing an access token. When a user makes a request I want to access its JWT token from the controller. @RequestMapping(value = "/users", method = RequestMethod.GET) public List<AppUser> getUsers(OAuth2Authentication auth) { logger.info("CREDENTIALS:" + auth.getCredentials().toString()); logger.info("PRINCIPAL:" + auth.getPrincipal().toString()); logger.info(

Accessing JWT Token from a Spring Boot Rest Controller

亡梦爱人 提交于 2021-01-03 07:07:31
问题 I am implementing a REST API with Spring Boot and I am securing it with JWT and Oauth 2. I have no problems with authentication and producing an access token. When a user makes a request I want to access its JWT token from the controller. @RequestMapping(value = "/users", method = RequestMethod.GET) public List<AppUser> getUsers(OAuth2Authentication auth) { logger.info("CREDENTIALS:" + auth.getCredentials().toString()); logger.info("PRINCIPAL:" + auth.getPrincipal().toString()); logger.info(

Accessing JWT Token from a Spring Boot Rest Controller

匆匆过客 提交于 2021-01-03 07:06:47
问题 I am implementing a REST API with Spring Boot and I am securing it with JWT and Oauth 2. I have no problems with authentication and producing an access token. When a user makes a request I want to access its JWT token from the controller. @RequestMapping(value = "/users", method = RequestMethod.GET) public List<AppUser> getUsers(OAuth2Authentication auth) { logger.info("CREDENTIALS:" + auth.getCredentials().toString()); logger.info("PRINCIPAL:" + auth.getPrincipal().toString()); logger.info(